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. 

 

Deactivate your plugins and themes. If you're using WordPress, try deactivating your plugins and themes one by one to see if one of them is causing the error.

 

Increase your PHP memory limit. If your PHP memory limit is too low, it can cause 500 errors. You can increase your PHP memory limit in your hosting control panel.

 

If none of these methods resolve your issue you may need to contact Ultra Web hosting support. 

  • 467 Users Found This Useful

Was this answer helpful?

Related Articles

Clean - Shrink ibdata1

To shrink ibdata1 once and for all you must do the following:MySQLDump all databases into a SQL...

403 Forbidden error with Drupal after install

There are a few things you can do to fix the 403 Forbidden error with Drupal after install:...

Could not connect to the MariaDB - MySQL database

The error message "Could not connect to the MariaDB" can occur for a number of reasons. Some of...

HTTP Authentication error in PHP

A HTTP Authentication error in PHP occurs when the user is not authorized to access the requested...

Learn About MySQL

MySQL is a relational database management system (RDBMS) that is open-source and free to use. It...