Skip to content

Accessing PHP files outside physical path in IIS

I have been told that for security reasons all PHP data handling files should be located outside of the website root directory. I have a website hosted in IIS 10 with the includes folder outside the root. Something like this:- website: C:inetpubwwwrootindex.php and PHP files C:includessubmit.inc.php This is o…

Laravel destroy nested resource

I have a resource name OrganizationEmailDomain and able to index it just fine In that view, when clicking in the three dots there’s the destroy part If in that index view I echo $email_domains (<?php echo $email_domains;?>) then I get as expected (note that the following was before the images were…

Unexpected number showing up at the end of JSON body

I am trying to write a simple demo that reads a json file with php and ajax. In js I have summary.php summary.json When I make a request I get an unusual 706 at the end of the response. curl localhost/summary.php | Select Content -Expand Content | jq produces Any help with this would be greatly appreciated. A…

PHP : Collect All Errors First Before Run Query

Is there any way to check if there will be an error on file uploading? Like putting a variable to know if there’s an error on every else statement so that before it will prevent running the query. Because what’s happening is even there’s an error on moving/copying/deleting a file, it still r…

Delete big chunk of data with where clause gives time-out

I’m trying to delete over 2 millions records with this statement And I get 504 error time-out, when I try the same statement with select instead of delete it works, there is an index on event_tstamp column. Any idea what could be the problem? Answer delete is a much more expensive operation than select.…