• I’m getting the dreaded 500 Internal Server Error on my wordpress blog and I’m at a loss for how to fix it, as is my hosting company (Dreamhost) apparently. The error only happens on certain posts. Some posts load just fine and the home page and all the site’s pages work fine. I can’t find a common thread that makes the posts that work, work while the others fail.

    I’ve tried increasing the PHP memory limit (via a php.ini file) disabling all plugins and creating a new .htaccess file. None of that worked. Dreamhost also “restarted the Apache instance my site resides on, as well as flushed my MySQL instance.” That still didn’t fix the problem. Then the folks at Dreamhost suggested that I change my permalink structure to use only the post name and that I should use only one category per post (some posts were listed under multiple categories)… I did both of those things and it still didn’t fix the issue.

    So here I am, at a loss with some posts on my site working and others not. Does anyone have any advice or thoughts on how to fix this? I’m really desperate for a solution here! (you can visit HowManly.com to see what I mean… the 5th post on the homepage is one of the non-working posts, the other 4 work).

    Here’s the 500 Internal Server Error I get:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, 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.

    Thanks in advance.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Try checking your site’s error logs for a more specific error message. Your hosts should be able to help you in accessing your site’s error logs.

    Esmi’s right – error logs are what you need to be checking. They’ll tell you where you need to start.

    I have seen something like this before, that is probably unrelated (I was not using apache). The only reason I mention it, is – Your post has a really long slug. In my case the 500 error only occurred when the slug was above a certain length. If you’ve tried everything else… then perhaps shortening that is worth a shot?

    Thread Starter TriniD4

    (@trinid4)

    Here’s what they say they found in the error logs:
    [Mon Jun 03 12:04:04 2013] [error] [client 71.192.4.229] File does not
    exist: /home/xxxx/howmanly.com/elsewhere-in-manly, referer:
    http://www.howmanly.com/
    [Mon Jun 03 12:04:04 2013] [error] [client 71.192.4.229] File does not
    exist: /home/xxxx/howmanly.com/missing.html, referer:
    http://www.howmanly.com/
    [Mon Jun 03 12:04:11 2013] [error] [client 71.192.4.229] File does not
    exist: /home/xxxx/howmanly.com/manly-advertising, referer:
    http://www.howmanly.com/
    [Mon Jun 03 12:04:11 2013] [error] [client 71.192.4.229] File does not
    exist: /home/xxxx/howmanly.com/missing.html, referer:
    http://www.howmanly.com/

    But they didn’t seem to know what to do with that, and neither do I. I’m not sure what’s missing and how they suddenly went missing. Nothing changed before the error suddenly started.

    Mmmm. Those logs tell you nothing… there should really be more errors than that. Is that all they have provided?

    Looking again at your site, I’m convinced the issue only affects your posts where the slug is (approx) 30 chars or more. Try shorten one of the post slugs (that is failing) and see if it fixes that post. And maybe its a solution for you?

    If this solution isn’t workable – the problem *may* be an issue with how the server/phphandler is configured. Hopefully some of that info helps?

    Thread Starter TriniD4

    (@trinid4)

    Thank you jibbius,
    so far that’s all they’ve sent from the error logs. I just requested more so we’ll see what else they send me. I’ll post what I can. In the meantime I’ll give your post slug suggestion a try now.

    Thread Starter TriniD4

    (@trinid4)

    Well,
    jibbius I tried your suggestion on 2 different posts with long slugs. Sadly it didn’t fix the problem on either post. I’ve requested more error logs from Dreamhost and as I said I’ll post them ASAP.

    Thread Starter TriniD4

    (@trinid4)

    Ok, here’s what my error log looks like. I don’t know what any of it means… any help would be great:

    [Tue Jun 04 00:53:27 2013] [error] [client xxx.xx.x.xxx] Premature end of script headers: index.php
    [Tue Jun 04 00:53:28 2013] [error] [client xxx.xx.x.xxx] Premature end of script headers: index.php
    [Tue Jun 04 01:07:45 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 01:07:46 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 01:23:59 2013] [error] [client xx.xxx.xx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 01:24:00 2013] [error] [client xx.xxx.xx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 01:27:04 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 01:27:06 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 01:44:57 2013] [error] [client xxx.xxx.xx.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/manly-advertising/kiss-the-girls-to-make-men-buy/
    [Tue Jun 04 01:44:58 2013] [error] [client xxx.xxx.xx.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/manly-advertising/kiss-the-girls-to-make-men-buy/
    [Tue Jun 04 02:39:52 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 02:39:53 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 02:56:12 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 02:56:13 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 02:59:10 2013] [error] [client xxx.xxx.xx.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/manly-advertising/kiss-the-girls-to-make-men-buy/
    [Tue Jun 04 02:59:13 2013] [error] [client xxx.xxx.xx.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/manly-advertising/kiss-the-girls-to-make-men-buy/
    [Tue Jun 04 03:09:42 2013] [error] [client xxx.xxx.xx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 03:09:44 2013] [error] [client xxx.xx.xx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 04:40:43 2013] [error] [client xx.xxx.x.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/author/manlyduane/
    [Tue Jun 04 04:40:45 2013] [error] [client xxx.xxx.x.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/author/manlyduane/
    [Tue Jun 04 04:45:49 2013] [error] [client xxx.xxx.x.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/wp-admin/edit.php
    [Tue Jun 04 04:45:50 2013] [error] [client xxx.xxx.x.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/wp-admin/edit.php
    [Tue Jun 04 04:46:37 2013] [error] [client xxx.xxx.x.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/
    [Tue Jun 04 04:46:39 2013] [error] [client xxx.xxx.x.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/
    [Tue Jun 04 04:46:44 2013] [error] [client xxx.xxx.x.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/
    [Tue Jun 04 04:46:45 2013] [error] [client xxx.xxx.x.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/
    [Tue Jun 04 04:49:12 2013] [error] [client xxx.xxx.x.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/
    [Tue Jun 04 04:49:14 2013] [error] [client xxx.xxx.x.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/
    [Tue Jun 04 04:52:14 2013] [error] [client xxx.xxx.x.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/wp-admin/post.php?post=1538&action=edit
    [Tue Jun 04 04:52:16 2013] [error] [client xxx.xxx.x.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/wp-admin/post.php?post=1538&action=edit
    [Tue Jun 04 04:58:20 2013] [error] [client xxx.xxx.x.xxx] Premature end of script headers: async-upload.php, referer: http://www.howmanly.com/wp-admin/post.php?post=1538&action=edit
    [Tue Jun 04 05:00:37 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 05:02:02 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/
    [Tue Jun 04 05:02:03 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 05:02:05 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/
    [Tue Jun 04 05:02:12 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 05:02:13 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 05:02:15 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 05:02:16 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php
    [Tue Jun 04 05:03:35 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/
    [Tue Jun 04 05:03:36 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/
    [Tue Jun 04 05:03:41 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/
    [Tue Jun 04 05:03:42 2013] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php, referer: http://www.howmanly.com/

    [Please post logs between backticks or use the code button.]

    Thank you

    That’s a bit more helpful, but still very hard to debug.
    Disappointing that ammending the slug length didn’t help.

    There’s some suggestions here:
    https://drupal.org/node/213260#comment-2120958
    (looks like you aren’t the only one who’s experienced this)

    I think the suggestions around making changes to php.ini ; or changing from fastcgi to cgi could be worth exploring. Sorry that I can’t provide you a more definitive solution. Good luck.

    Further googling of the error may reveal more too.

    Thread Starter TriniD4

    (@trinid4)

    jibbius thank you! Turning off FastCGI seems to have been part of the solution. I also discovered as I turned plugins back on that W3 Total cache was also causing an issue.

    All posts are loading normally, however I’m having trouble uploading images to the media library. I get a HTTP error each time. I’m hoping this isn’t a connected issue… I’ll look that issue up but thank you for helping me solve this vexing problem!

    So W3TC was the cause of the issue?

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘500 Internal Server Error’ is closed to new replies.