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

What causes 500 Internal Server Errors?

Here are the three most common reasons:

  1. File permissons set incorrectly. Most commonly having a file as "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 too that the permissions of the parent folders/directories need to be set correctly too. See our File Permissons article for more information, including how to change those permissions.

  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 the "Error Log" icon under "Logs."

cPanel-error-log

For example, if I set a PHP file to 777 permisions (writeable by the world) this will cause a 500 Internal Server Error. I would be able to view something similar to the following in my 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

I would 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
print "content-type: text/html \n\n"
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've looked for the above causes but are unsure on what needs to be done next to fix the problem, please contact technical support. We're available 24/7 and we're always happy to help.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Support Center:
Email Address
Optional, but our team may contact you for more information.
Like this Article?

Comments

Post a comment
n/a Points
2014-04-16 3:34 pm

500 Internal Server Error - I can't fix it.

Staff
5,553 Points
2014-04-16 4:27 pm
Hello Luis,

We'd need a bit more information in order to assist with your issues. It looks like currently your're running a PrestaShop website in maintenance mode. Did you do anything to your store prior to the 500 Internal Server Errors happening?

- Jacob

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Write New!
Do you want to publish a tutorial to our support center?

News / Announcements

SSL Certficate Warnings
Updated 2014-04-14 11:34 am EST
Hits: 2013
Heartbleed 0-day OpenSSL security bug
Updated 2014-04-14 04:43 pm EST
Hits: 5296

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!