PHP displays blank white page even with all error reporting enabled
Drupal itself changes the error reporting and display settings which happens after the ini file (where your settings reside) is processed. To change the settings after drupal does you can add
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
to index.php.
Drupal is complex. The blank white page is affectionately known as the "white screen of death" (WSOD) in the Drupal community. See http://drupal.org/node/158043 for more troubleshooting help.
Related videos on Youtube
Andy Shinn
Updated on September 18, 2022Comments
-
Andy Shinn over 1 year
I am trying to debug a broken page in a Drupal application and am having a hard time getting PHP to spit anything useful out. I have the following set:
error_reporting = E_ALL display_errors = On display_startup_errors = On log_errors = On error_log = /var/log/php/php_error.log
I have a file showing me phpinfo() which confirms these variables are set correctly for the environment. I have increased memory_limit to 256M (which should be more than enough). Yet, the only indication I get is a status 500 code in the apache access log and a blank white page from PHP.
The Apache virtual host has LogLevel set to debug and the error log only outputs:
[Sat Jun 16 20:03:03 2012] [debug] mod_deflate.c(615): [client 173.8.175.217] Zlib: Compressed 0 to 2 : URL /index.php, referer: http://ec2-174-129-192-237.compute-1.amazonaws.com/admin/reports/updates [Sat Jun 16 20:03:03 2012] [error] [client 173.8.175.217] File does not exist: /var/www/favicon.ico [Sat Jun 16 20:03:03 2012] [debug] mod_deflate.c(615): [client 173.8.175.217] Zlib: Compressed 42 to 44 : URL /favicon.ico
The PHP error log outputs nothing at all. kernel and syslog show nothing related to Apache or PHP. I have also tried installing suphp and checking its log just confirms the user is executing correctly:
[Sat Jun 16 20:02:59 2012] [info] Executing "/var/www/index.php" as UID 1000, GID 1000 [Sat Jun 16 20:05:03 2012] [info] Executing "/var/www/index.php" as UID 1000, GID 1000
This is on Ubuntu 12.04 x86_64 with the following PHP modules:
ii php5 5.3.10-1ubuntu3.1 server-side, HTML-embedded scripting language (metapackage) ii php5-cgi 5.3.10-1ubuntu3.1 server-side, HTML-embedded scripting language (CGI binary) ii php5-cli 5.3.10-1ubuntu3.1 command-line interpreter for the php5 scripting language ii php5-common 5.3.10-1ubuntu3.1 Common files for packages built from the php5 source ii php5-curl 5.3.10-1ubuntu3.1 CURL module for php5 ii php5-gd 5.3.10-1ubuntu3.1 GD module for php5 ii php5-mysql 5.3.10-1ubuntu3.1 MySQL module for php5
So, what am I missing here? Why no error reporting?
-
Jee Garin almost 12 yearsIt's possible that PHP is segfaulting before it gets a chance to startup properly. Can you try running
php -m
at a terminal (if you have a module loading twice, this might segfault)? If that works tryphp index.php
while in the folder of your Drupal installation and let us know what happens.
-
-
Andy Shinn almost 12 yearsWhile this did work for other pages, ultimately my problem was that I had a mix of 500 and 200 code WSODs. The particular one in this case actually was giving back a HTTP 200 OK so it proved to be very difficult to debug. I eventually narrowed it down to the media_mover module submodule mm_s3. I resorted to disabling modules in batches for process of elimination.