15-Nov-2013

White Screen of Death for Drupal

Recently, and on another occasion a while ago, my website was experiencing the White Screen of Death (WSOD).

According to http://drupal.forhumanists.org/book/white-screen-death you need to check for possible PHP errors that are occurring.

Error Reporting Code

To see the errors place the following into index.php (located in the site root folder):

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

My site then showed the following error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 7642683 bytes) in /home4/rinetcom/public_html/glenneaton/includes/menu.inc on line 968

Increasing PHP Memory

  1. Download a copy of the file that is located at [Drupal root]/sites/default/settings.php
  2. Make sure the file has the following line and that the memory allocation is correct.
    ini_set('memory_limit', '512M');
  3. Save the file.
  4. Change the file permission level of the settings.php file on your server from "444" to "777"; otherwise you will not be able to over-write it with the newly saved file you have on your computer.
  5. Once uploaded restore the settings.php file permissions to 444, or 555.

Testing and Finishing

Retest your site and if desired remove the error reporting code entered into index.php.

Leave a Reply

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram