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. 

  • 465 Users Found This Useful

Was this answer helpful?

Related Articles

Learn MySQL

If you do not know how to use MySQL there are some great guides at the following websites....

Error: SoftException in Application(dot)cpp:303 UID of script is small than min_uid

Error: SoftException in Application.cpp:303 UID of script is small than min_uid when going...

Changing your PHP version

Have you received an error regarding your PHP version? If so, you may quickly and easily change...

How do I backup a MariaDB - MySQL Database?

In the control panel, within Backup section, under Download a SQL Database Backup will be your...

How can I view/modify data in my MariaDB - MySQL database?

Only make changes if you know exactly what you are doing. Often incorrect changes can have an...