My Blog

Wordpress and the Blank Screen of Death

I experienced my first blank screen of death in Wordpress about two months ago (not bad going considering the amount of wordpress sites I edit/administer.) when I was working on an install of WPMU, the developer I was working with figured out the issue really quickly. An empty line before or after the opening or closing php declerations:

<?php Code Here  ?>

And the answer was to try the following:

  • Uninstall all plugins (No Joy!)
  • Revert to default theme (No joy)
  • Upload fresh theme (Implication being you haven’t messed with it – no joy)

When none of that worked the only solution was to trawl through all of our files until we found one with an empty line – fortunately the search started and stopped with the config file which we’d recently edited.

Then a few weeks later and yet again it was my config file and this time a google search showed I wasn’t alone in having this issue.

Once I could put down to bad editing, but twice seemed a bit much. I figured it must be my editor WebDesign by Rage Software, so I switched to Text Wrangler.

Then yesterday while installing a wordpress site for a friend I got the following php error during the installation: 

Warning: Cannot modify header information – headers already sent by (output started at /home/account/public_html/test-site/wp-config.php:153) in /home/account/public_html/test-site/wp-login.php on line 255

A quick Google later and yet again it seems that it’s an empty space in the config file, and yes i’ve used WebDesign again to edit it!

So I decide to compare the code (In Text Wrangler) from my affected file to that of a healthy one, and look what turns up:

Image grab of comments from healthy config file

Image grab of comments from healthy config file

That’s as you would expect, now look at what WebDesign did to it:

 

Image grab of comments from nasty file

Image grab of comments from nasty file

Empty spaces everywhere! Either it’s adding them by default or I’ve ticked an option somewhere. From now on i’ll just have to use Text Wrangler as default – which is no hardship, I just wish I could set the text to soft wrap as default – I seem to have to enable it everytime I load up!

Comments

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!