• Resolved miketheactuary

    (@miketheactuary)


    For the past week, I’ve been plagued with my site generating 500 server errors.

    My ISP’s helpless desk thought, based on the logs, the problem was with my theme (a variation of Cutline) and my plugins…but the error manifested even with all plugins disabled, and regardless of theme, and the error did not manifest on a testbed site which uses the same plugins and themes.

    I did port the site’s content over to a freshly installed WordPress and a shiny new database…but the error emerged at the new site a few days later.

    Other oddities:

    • Admin pages and 404 pages served normally. However, anything pertaining to actual database-stored content failed.
    • My site was still accessible through Safari on an ipod, via the WP-Touch plugin.
    • Doing a fresh install of WordPress didn’t resolve the problem, unless I pointed to a new database as well.
    • Truncating the footer files by removing the </body> </html> tags restores the site to apparently normal functionality.

    It’s bizarre to me that removing the /body and /html tags would fix a 500 server error.

    So, can anyone suggest what the real problem is here?

Viewing 3 replies - 1 through 3 (of 3 total)
  • 500 internal server errors can be caused by things like errors in scripts and .htaccess files (I’ve done this before) and by problems with your web host’s server.

    One unrelated thing, I’d recommend that you either remove or change the label over your right Adsense sidebar to read Sponsored Links. Adsense is a stickler about things like this.

    Thread Starter miketheactuary

    (@miketheactuary)

    A couple of other items (now that I’ve gotten some sleep) that just add to the bizarreness of my issue:

    • The 500 error also impacts/impacted the RSS feed. Experimenting with trying to avoid the 500 error and get the feed to validate reveals that I can have the closing tags, but a whitespace is required in the very last tag. In other words, </body></html> causes php to hang, but </body></html > (note the space) is happily served.
    • The 500 error / php hang was not triggered on admin pages (except when editing/posting/deleting articles or changing themes), or when serving 404.php as a result of a 404 error (e.g. https://www.triskele.com/foobar). However, if I copied 404.php to index.php and then called the top-level of my site, php would hang and I’d get a 500 error.
    • One apparent side effect of playing with the closing tags — WP-Cache isn’t caching.

    As I wrote earlier — the issue exists on my primary site. I was able to clone on a fresh install / different URL and operate for a few days before the problem emerged there. A test site which is configured exactly the same as my main site but for content and address is unaffected. The issue exists regardless of theme, regardless of plugins or widgets activated…except for WP-Touch, through which my site was accessible via iPod even as it was hanging for other browsers.

    And annoyingly, the host provider’s response is the usual disable plugins/use a simpler theme/check .htaccess….and an unwillingness to share php logs.

    Hopefully I’ll stay “fixed enough” until I have the time to go through the rigmarole of changing providers. ??

    Thread Starter miketheactuary

    (@miketheactuary)

    After a bit more searching through the forums, I thought I’d attempt one last squeaky-clean reinstall of the wordpress files themselves (wipe all files, fetch/install latest.tar.gz, copy-but-not-overwrite files from backup).

    It worked.

    I still have no clue what happened…but it’s definitely fixed (for now, at least).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Odd 500 Error Fixed With Dropping </body></html> tags?’ is closed to new replies.