Error 500 - Internal Server Error - PHP
This can be due to several factors. The first thing to check is that the permissions on the file and all relative files to it are set to 755 which you can set in your FTP client or in SSH via chmod.
When multiple files are selected for a permission change in some ftp programs, the ftp program will not set all files to that change if just one of the scripts is already set to 755. Verify each file is set to 755 and set each individually if necessary.
An executable .php file which has its' permission set to 755 may not be placed in a folder permission set to 777.
The next thing is to make sure all the path configurations within the file are correct.
Also often, an FTP client will upload a file in binary instead of ascii when it is set to auto. Force the program to upload the file in ascii then try again. Or binary if you are uploading PHP Zend or Ioncube compiled files for example.
Often you can find a forum or faq on the scripts website assisting you with common errors like this one.
Another common cause is a .htaccess file with lines that don't agree with the server. A quick way to see if that is the issue is to rename the file to .htaccess.bak. If the error goes away you can then troubleshoot which section in the file is causing the issue by placing a # at the beginning of each line. We run PHP on our servers in CGI mode for security so you may need to run a command differently or via your own php.ini file in its directory.
To track down the issue you may find a file called "error_log" in the directory. By viewing the last lines of the file you should be able to locate the problem and troubleshoot it from there.
A command within a PHP file that does not work with PHP in CGI mode may also cause this error and you may need to simply change a line to be more clean and secure for it.
What modules does the script require? If a module is not available this can trigger a 500. Check the website or with the develop for the requirements of the script.
Turn on debug mode in the script and/or check the error_log file for it to help track the issue further.
If your script requires an older version of PHP or a different requirements from our default, you may change your php setup via your hosting control panel and the Select PHP Version icon.
Was this article useful? Have any suggestions or improvements to the information?
PHPList produces internal server error. Checking error logs results in: Invalid command...
In the MariaDB / MySQL Database section of your hosting control panel, after creating a database...
In the control panel, within Backup section, under Download a SQL Database Backup will be your...
We use both PHP versions 4.4.x and 5.x.
MariaDB is a drop-in replacement for MySQL. The lead developer and founder of MySQL, Michael...