This site utilizes JavaScript to function correctly. Looks like it's disabled on your browser. Please enable it for your best experience.

For instructions on enabling JavaScript, click here

Skip to main content

Just Host Web Hosting Help

What Is A 500 Internal Server Error? How To Fix 500 Internal Server Error

A 500 Internal Server Error can be caused by many things, including but not limited to invalid permissions, invalid ownership, bad lines in your php.ini or .htaccess file, invalid requests in the script, and others not mentioned here. Typically this is not a problem with the server itself, and can be most often resolved by modifying something in your site's configuration. Please check the Error Logs in cPanel for specific information.

Example of Server 500 Error

A Server 500 error will generally look something like this:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Bad permissions, Writable by group

A bad permissions error may look something like this:

[Sun Jun 05 12:03:22 2012] [error] [client 66.249.72.82] SoftException in Application.cpp:601: Directory "/home/exampleuser/public_html" is writeable by group

In this instance the folder had permissions for a folder set too high. To correct this, the permissions need to be changed from "777" to "755".

Directories and folders should be 755. Executable scripts within the cgi-bin folder must be 755. Images, media, and text files like HTML should be 644.

  • Files - 644
  • CGI Scripts - 755
  • Directories - 755

You can modify permissions with the File Manager, located in the "Files" category of the cPanel, an FTP client, or using the chmod command in SSH/Bash.

Bad .htaccess, Invalid code, command, or syntax

In the .htaccess file ("dot htaccess"), you may have added lines that are either worded badly or conflicting. The best way to troubleshoot this is comment out the lines in the .htaccess.

You can comment out a line in the .htaccess by adding # to the beginning. You are wise to save an original copy of any file before you make changes.

For example, if the .htaccess looks like this:

DirectoryIndex default.html
AddType application/x-httpd-php5 php

Then try something like this:

DirectoryIndex default.html
#AddType application/x-httpd-php5 php

Broken lines and lines that start with php_flag are the most common mistakes. If you cannot determine which line is the problem, then comment out every line.

Other common .htaccess errors:

FollowSymlinks:

An error may look like the following:

[Sun Jun 05 12:07:10 2011] [alert] [client 66.249.72.82] /home1/examplec/public_html/.htaccess: Option FollowSymlinks not allowed here

In this example the error is simple to fix; in the file specified, use a permitted directive--in this case use "SymlinksIfOwnerMatches" instead of "FollowSymlinks", or remove the line entirely.

Syntax Not Closed:

An error may look like the following:

[Sun Jun 05 12:11:38 2011] [alert] [client 66.249.72.82] /home1/examplec/public_html/.htaccess: /home1/examplec/public_html/.htaccess:3: <IfModule>ExampleRule/Module> was not closed.

Again, the solution is to simply fix the syntax, or remove it. In this case, close the ending "</IfModule>"; directive properly and put the rules on their own line to resolve the problem.

These are just a few common examples that can be caused by bad .htaccess parameters. What you encounter will likely vary, however generally the error message is descriptive enough to determine an error from it without further investigation.

Improperly configured php.ini

ForceType:

When you are using files with (or without) an extension different then the normal extension for that filetype you can use ForceType in your .htaccess file to make it clear to the server how to handle that file (or all the files in the folder) (this works on servers without phpsuexec).

An example: When you have a file called "item" (like Nucleus uses for FancyURL's) and want it to be parsed by the server as php you use the following code in your .htaccess file:

ForceType application/x-httpd-php

However, because our servers use phpsuexec this will result in an internal server error. To solve this you can simply use SetHandler instead of ForceType, so your .htaccess-file becomes:

SetHandler application/x-httpd-php

php_value:

On a server without phpsuexec it is possible to use the php_value statement in a .htaccess file to change the settings of php (actually overwrite the settings from php.ini). On a sever with phpsuexec this will also result in a server error. To solve this you can use a php.ini file which you put in the same folder as where you would have put your .htaccess file. In that php.ini file you can change all the php values. You only have to put the values you want to modify in that file. By example if you want to set the short_open_tag to Off you would have used short_open_tag? = off in your .htaccess file. Using a php.ini file this results in:

[PHP]
short_open_tag = Off


Knowledgebase Article 702,184 views bookmark tags: error


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

This article will explain some common causes for 500 errors on Dedicated or V.P.S servers.
Knowledgebase Article 119,264 views tags: dedi dedicated error server vps

500 Internal Server Error when installing via the MOJO Marketplace installer.
Knowledgebase Article 269,739 views tags: cpanel errors htaccess panel php script simpel

Look for the error message that most closely matches the one you received.
Knowledgebase Article 181,486 views tags: email error

Related Help Content

Creating a resold account causes the error &quot;Sorry, a group for that username already exists.&quot;
Knowledgebase Article 89,415 views tags: error group reseller username whm

Clients in China are unable to view my website. My website's content doesn't contain any objectionable material.

The website is taking a long time to load. It just seems slower today than normal.
Knowledgebase Article 516,501 views tags: site slow web website

You have invested a significant amount of time creating and perfecting your website, and you're ready to publish it for the world to see! Are you really though? Use this checklist to ensure your site is ready for publication.
Knowledgebase Article 69,399 views tags: checklist guide list practice publication publish site website

I need to transfer my website from my old host to Just Host, but I do not know how to do it without losing files or mail.
Knowledgebase Article 551,916 views tags: transfer upload website

Server Status FAQ's

We are offering free website migrations for qualifying WordPress websites within the first 30 days after signup. The offer includes the transfer of one WordPress website and the ability to review the site before it goes live.
Knowledgebase Article 65,530 views tags: detail migrate migration offer site website wordpress wp

The server is under a DDoS attack, what should I do?
Knowledgebase Article 202,455 views tags: ddos maintenance server

** Google ad credits are only available to customers in the United States, Canada, and the United Kingdom at this time.

¹ VAT (Value Added Tax) is not included in our advertised price and will be charged separately and itemized on invoices and billing information. Standard VAT rates based on EU Member State regulations may apply. Learn more.