Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

How can I see the error messages when the site I am working on gets a white screen?

share|improve this question
hello sokratis, this is an interesting question and I see several answers, do you know what answers are suitable for this case?. Remember assign a feedback (with comments or accpeting an answer) for to the community know suitable answers. –  moon.watcher Aug 25 '11 at 16:43

3 Answers 3

up vote 15 down vote accepted

Put this at the bottom of settings.php:

error_reporting(-1);  // Have PHP complain about absolutely everything 
$conf['error_level'] = 2;  // Show all messages on your screen, 2 = ERROR_REPORTING_DISPLAY_ALL.
ini_set('display_errors', TRUE);  // These lines just give you content on WSOD pages.
ini_set('display_startup_errors', TRUE);
share|improve this answer
This is great for development sites though I prefer /var/log/apache2/error.log for live sites. This works though. :) –  Citricguy Feb 3 '12 at 5:25
Saved the day for me. Thanks –  qasimzee May 12 '14 at 6:22
@mike -- Can I ask you, where can I find settings.php? –  XXX.xxx Nov 4 '14 at 3:34

The White Screen of Death (Completely Blank Page) resource on drupal.org will step you through the steps to see the error message as well as common problems that cause them.

"Invisible" Errors

If error reporting is turned off, you could be getting a fatal error but not seeing it. On a production site, it is common to have error reporting turned off. If that is the case and PHP has hit an unrecoverable error, neither an error nor content will be displayed, therefore you end up with a completely blank page.

What you can do about this is either turn on PHP error reporting so it displays a message on the page itself, or check your log files (from the server) to look for the error. How to do both of these are explained below.

Enable Error Reporting

Although it may be turned off on commercial hosts and production sites (for good reason, so that users do not see the errors), these errors are one of your best tools for troubleshooting. To enable error reporting, temporarily edit your index.php file (normally located in your root directory) directly after the first opening PHP tag (do not edit the actual file info!) to add the following:

ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

You will now be able to see any errors that are occurring directly on the screen. Memory problems may still not be displayed, but it's the first step in a process of elimination.

If you are using a multi-site setup and only want errors to appear for one site, then check the name of the host first as in:

if ($_SERVER['HTTP_HOST']==='some.domain.name.here') {
  ini_set('display_errors', TRUE);
  ini_set('display_startup_errors', TRUE);

If the problem occurs while running update.php open update.php in a text editor and uncomment the following line:

ini_set('display_errors', FALSE);
share|improve this answer

Have a look at Apache error log, in Ubuntu it's located in /var/log/apache2/error.log so you can do:

tail -f /var/log/apache2/error.log

share|improve this answer
sudo tail -f /var/log/apache2/error.log –  Citricguy Feb 3 '12 at 5:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.