500 Internal Server Error


The “500 Internal Server Error” may be referred to in one of a couple different ways. The most common references are:

  • Internal Server Error
  • 500 Error
  • HTTP Error 500

Internal Server Error

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

Pleas contact the server administrator, [no address given] 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.


Apache/2.2.16(Debian) Server at bamajr.com Port 80

500 Internal Server Error on iPhone 4

When this error occurs, the web browser window title, shows the full name (500 Internal Server Error) and the error heading shows a truncated name (Internet Server Error). No matter how you recognize it, if you happen to stumble on this error, there isn’t much you can do about it.

A 500 Internal Server Error IS, exactly what it is called… an internal, server error. It doesn’t matter what web browser is being used or what operating system is on the computer. This error exists because something went wrong on the server. In reality, this error could be cause by a number of things, none of which a user can control. After a user has tried refreshing the web page or contacting the webmaster, the user will simply have to be try again later.


500 Internal Server Error: An Administrator’s Nightmare

The “500 Internal Server Error” can be a nightmare for inexperienced Server Administrators. Blue Host identifies three main reasons why a “500 Internal Server Error” is generated:

  1. Incorrect File/Folder Permissions
  2. Bad Code, or Incorrect Syntax in the .htaccess File
  3. Incorrect php.ini Configuration

While I think the Blue Host article is mostly accurate, it is also a little deceiving. I think Blue Host accurately identifies the three most common reasons for this error. Blue Host also accurately mentions that other reasons can exist, as well. However, the “500 Internal Server Error” is most definitely an internal server problem, though Blue Host states that it “typically” is not a problem with the server itself.

Knowing the error is almost always an issue with the server, Server Administrators have the daunting task of locating the problem and fixing it. Even with only three common reasons for this error, there can be many, many tasks, associated with locating the root cause. So, while most Server Administrators have tools to help them troubleshoot the error, Advanced Server Administrators will go right to the web server’s Error Log.

My servers are currently running Debian GNU/Linux 6.0.5 (Squeeze), with the Apache HTTP Server (along with a lot of other stuff). So, on my system, the Apache Error Log is located at:

user@server: /var/log/apache2/error.log

Now, on this same server, I’m also taking advantage of logrotate, which creates a new log file, for every day an error is generated and backs up the previous day’s log file. This makes it easy for me to find a specific error, on a specific day. Server Administrators who choose not to use logrotate, may find their log files are really long and cumbersome.


500 Internal Server Error and WordPress

At some point yesterday (late afternoon or early evening), I started getting blank pages, when trying to log into my WordPress Website. Upon further investigation, I was able to identify that those blank pages were actually “500 Internal Server Error” pages, though not every page was actually displaying the error message.

I started investigating the issue by looking at the Apache Error Log, for my server. I noticed that every time I tried to log in, or access one of the WordPress Administration Areas, the following error was being logged:

[Fri Aug 10 09:26:54 2012] [error] mod_fcgid: process /home/bamajr.com/fcgi-bin/php5.fcgi(15293) exit(communication error), get unexpected signal 11
PHP Warning:  Module 'gd' already loaded in Unknown on line 0
PHP Warning:  Module 'mcrypt' already loaded in Unknown on line 0
<br />
<b>Deprecated</b>:  Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Deprecated</b>:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Deprecated</b>:  Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Deprecated</b>:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in <b>Unknown</b> on line <b>0</b><br />

Looking through the log files, I was able to confirm when the error started, and verify that it occurred every time I tried to log in or access any part of the WordPress Administration Area.

In WordPress, this error is most likely to occur when plugins (or themes), with weird code in them, get installed or activated. The unusual part of this specific incident is, I hadn’t installed, activated or edited any plugins or themes, nor had I made any changes to widgets, pages or posts. I simply logged in, reviewed some stats, moderated a single comment, and deleted a user. Then, for some unknown reason, the “500 Internal Server Error” started popping up.

Still suspecting a plugin problem, I started by manually removing all plugins, via FTP. I first copied each plugin over to a directory on my computer, and then deleted the plugins from the ~/public_html/wp-content/plugins directory, on the server.

I had all of the following plugins installed:

500 Internal Server Error WordPress Installed Plugins 01

All the pictured plugins were activated except the three QR Code Plugins. They were installed, but not active.

Next, I started re-adding each plugin (via FTP), by copying them back to the server, from my computer. I added one plugin at a time, logged into the WordPress admin area, activated the plugin, logged out, browsed a couple pages on the website, logged in again and logged out again. I followed this process, until I came to the SendPress Plugin – and the issue started again, immediately upon activating the SendPress Plugin.

This time, when the issue started, I only had the following plugins installed (plus SendPress – not shown):

500 Internal Server Error WordPress Installed Plugins 02

All the pictured plugins were activated except the single QR Code Plugin. It was installed, but not active.

This told me there was in issue with the SendPress plugin. Now, I know it may not be an issue with the SendPress plugin, itself and could instead, be an issue of an incompatibility between SendPress and another plugin. However, by removing the SendPress plugin, I was able to re-add all the remaining plugins, without any additional “500 Internal Server Error” pages being generated and without additional errors in the Apache Error Log.

I was able to identify the problem and find a solutions. I also submitted this issue, to the plugin devoloper, via the SendPress Plugin Support Forum, on WordPress.org, and included all these details.


500 Internal Server Error: Server Header Status Codes and SEO

After all this techno-babble, people concerned with Search Engine Optimization (SEO), only have one question on their mind. How does the “500 Internal Server Error” affect SEO?

For one answer, take a look at this infographic, created by Dr. Pete, for SEOMoz:

An SEO's Guide to HTTP Status Codes (An Infographic)

A little more artistic interpretation of Status Codes and their effect on SEO can be found here.

In my opinion, all Server Header Status Codes have some effect on SEO. To what degree they have an effect, depends on the specific Status Code. I can tell you this, though, when a “500 Internal Server Error” is displayed, the visitor, whether a person or robot, is not getting the information they were looking for. So, you tell me, how the “500 Internal Server Error” effects SEO.

Comments

  1. says


    FYI: I’m pretty sure “signal 11″ is a segmentation fault. which would seem to indicate an invalid memory access attempt.

    [error] mod_fcgid: process /home/bamajr.com/fcgi-bin/php5.fcgi(15293) exit(communication error), get unexpected signal 11

Trackbacks

Add Comment Register

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>