bdistler Posted April 25, 2017 Posted April 25, 2017 as I try any new PHP script - I receive "Internal Server Error" this URL has no error (has been on the server for days) --> [ http://lillianday.com/index.php ] this URL throws a 500 error (script just uploaded today) --> [ http://lillianday.com/thething.php ] this URL throws a 500 error (has been on the server for days) --> [ http://lillianday.com/hits_counter.php ] BUT URL [ http://lillianday.com/index.php ] calls that script [ hits_counter.php ] with no errors ### any PHP script that I upload today throws a 500 error ModSecurity is off in cPanel I did a test with files [ .htaccess ] rename as [ .htaccess.bu ] - received same 500 error made the script [ thething.php ] by hand (i.e. no cut and paste) here on my desktop - uploaded with FileZilla - received same 500 error made the script [ thething.php ] by hand (i.e. no cut and paste) in cPanel's File Manager - received same 500 error downloaded the script [ thething.php ] made in cPanel's File Manager using cPanel's File Manager [ Download ] - did a compare (i.e. using KDiff3) with the file I made on my desktop - they are binary equal this is the code of the script [ thething.php ] <?php print "Hello"; ?> ###
wolstech Posted April 25, 2017 Posted April 25, 2017 I can't test any of those links since they all throw a 403 Forbidden... Either way, did you verify that the permissions of the file are 644 (owner rw, group and public r) in Filezilla? If the group has write permissions to them (664), they won't run...
bdistler Posted April 25, 2017 Author Posted April 25, 2017 I can't test any of those links since they all throw a 403 Forbidden...you should be able to test them now ### Either way, did you verify that the permissions of the file are 644 (owner rw, group and public r) in Filezilla? If the group has write permissions to them (664), they won't run...you called that one right - most of the time that is the first thing I check when I have a issue like this - but I think the issue of a script can run a script but I can not - made me overlook permissions ###
Krydos Posted April 25, 2017 Posted April 25, 2017 When you include a php script into another php script as far as the server is concerned it just copy/pastes the code from the included file into the spot where the include/require command is and run the script with the permissions of the called php script. So what matter here is that the read flag was set. If you were to curl to another php script or use something silly like exec("script.php") then the permissions of that script would matter. Suphp cares a lot about permissions and if they're a little off it just shuts down with a 500 error.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now