I get 500 Internal Server Error

  • September 11, 2017
  • 0 Comments

The 500 Internal Server Error can be very frustrating because it is such a vague error. In addition to the error message text itself being vague, there are actually several different issues that can cause the 500 error message to appear. This can lead to headaches for troubleshooters.

What causes 500 Internal Server Errors?

Here are the three most common reasons:

  1. Incorrect file permissons - Having a file permission as 777 "world" writeable. This is a very common issue with PHP files. In general on our servers, PHP file permissions should not be higher than 775. Keep in mind that the permissions of the parent folders/directories need to be set correctly too.

  2. Leaving file permissions set incorrectly after manual installation of content management systems, forums, blogs, etc.

  3. Coding errors in the .htaccess file.

Correcting a 500 Server Error:

To track down what is causing the error, you will want to start with the error log in cPanel. Once you are logged into your cPanel look for and click on Errors under the heading Metrics.

For example, if you set a PHP file to 777 permission (writeable by the world) this will cause a 500 Internal Server Error. You would be able to see something similar to the following in the Error Log:

[Tue Sep 20 08:18:01 2011] [error] [client 174.77.92.170] 
SoftException in Application.cpp:264: File 
"/home/username/public_html/concrete/index.php" is writeable by others

You would then correct this by changing the permissions of the index.php file to 644.

Perl Scripts and 500 Errors

While a 500 error from a Perl script error may not be common, it can be even harder to track down because the cPanel Error Log does not tell us in this case what specifically caused the 500 error message. You will want to track down the code causing the error. It can even be something as simple as one missing character in your code. For instance, in the following code:

#!/usr/bin/perl<br>print "content-type: text/html \n\n"<br>print "Hello, PERL!";

The second line is missing a semi-colon at the end, so:

print "content-type: text/html \n\n"
SHOULD BE...
print "content-type: text/html \n\n";

There are many different possible causes of 500 errors, so it is difficult to give an example of each and every situation. If you have looked for the above causes but are unsure on what needs to be done next to fix the problem, please contact our technical support.


How helpful was this article to you?