Quick and dirty debugging of the notorious ExpressionEngine blank page bug

I don’t do a lot of ExpressionEngine work any more, but I still get the occasional email about it. More often than not, a serious bug triggers the uniquely ExpressionEngine response of a completely blank page. Not particularly helpful when you’re trying to debug the issue.

Although there are various settings you can trigger in the admin, I found the easiest thing to do is to add the following lines to the index.php file in your site root, just below the error_reporting(0) line (EE 1.6-7) or the $debug declaration (EE 2):

Reload the affected page to see the PHP error that is being thrown and figure out where to start debugging.

And of course, don’t forget to remove the debug code once you’re back up and running!

One thought on “Quick and dirty debugging of the notorious ExpressionEngine blank page bug

  1. Hello Watch Maker Project,

    This helped me a lot. I have spent two days combing through EE forums to no avail. But having a way to see the errors takes me out of the dark, or in this case out of the blank white screen. I was transferring and updating and old install of ExpressionEngine my index.php page was completely white, even if I put error_reporting(1); in the root index.php and in admin/index.php there was no feedback. When I added your code I got this:

    Warning: require(path.php) [function.require]: failed to open stream: No such file or directory in /home/jacmoo11/new.thingish.net/index.php on line 105

    Fatal error: require() [function.require]: Failed opening required ‘path.php’ (include_path=’.:/usr/local/lib/php:/usr/local/php5/lib/pear’) in /home/jacmoo11/new.thingish.net/index.php on line 105

    A silly error, admittedly. But much easier to slap myself on the forehead and say DOH! when it is spelled out for me. So, I just uploaded the path.php with the proper path to my admin and presto, it all works.

    Thanks so much for taking the time to post this. Over a year later it is still helping.

Leave a Reply to Don Cancel 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>