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

How do I change my PHP settings?

How do I change my PHP / PHP.INI settings?To change your PHP settings, just login to your hosting...

HTTP Authentication error in PHP

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

Internal Server Error with PHPList

PHPList produces internal server error. Checking error logs results in:Invalid command...

How do I backup a MariaDB - MySQL Database?

Here are the steps on how to backup a MySQL database using phpMyAdmin in your Ultra Web Hosting...

I am having problems with a script I wrote

PHP suexec is running on all of our shared servers. If you are running code that is insecure or...