There is a folder on my apache server containing several php scripts. All the php scripts in this folder work except for 1. All the php scripts including the script that doesn't work have the same rights.
When I run the script in my browser I get this error:
HTTP ERROR 500
Details that may be helpful:
PHP Version 7.0.11 Apache/2.2.15 (CentOS)
An Apache status code of 500 means "internal server error". Without seeing the code that is producing this error it is hard to say what is causing it but the first things to check are server configuration and your .htaccess file. Make sure your server is running properly then check your .htaccess file as a bad rule can force some types of PHP to malfunction. As @RiggsFolly stated, it is also possible that the problem is some very poorly written PHP which can be tested by replacing it with a simple program like: <?php echo "test"; ?>
SOLUTION: In my case the problem of 500 error was the upgrade from php 5.x to 7; BUT: I imagine this error can come from many other reasons, so if it does not apply, good luck finding the other solutions. In this case, it worked - and the solution is to rewrite the code or downgrade to old PHP version until you re-code the incompatible parts.
EXPLANATION / DEBUGGING PROCESS: After several tests to identify what is happening (commenting parts of code, testing functions, reading documentation), I found that deprecated functions from previous versions of PHP will generate a 500 Error.
For example, in a script written for PHP<7 you may still have old mysql queryes like mysql_connect, and once your server is updated to 7 (and you must use mysqli), this script will throw 500 error. I imagine this happens to any other function that became deprecated.
In your case, my bet is most of the scripts are compatible with 7, one is not.