Community Documentation

Blank pages or "white screen of death" (WSOD)

Last updated March 5, 2013. Created by jwuk on July 10, 2007.
Edited by amitnaik, LeeHunter, jhodgdon, Stepan Kabele. Log in to edit this page.

Occasionally a site user or developer will navigate to a page and suddenly the page content disappears, and it becomes blank. No content. No errors. Nothing. This happens sometimes, It could happen after updating a module, theme, or Drupal core. This is what is referred to by most members of the Drupal community as the White Screen of Death or WSOD. There are several reasons why this might occur, and therefore several possible solutions to the issue.

(Note: The suggestions on this page might solve the problem even when you do not get the WSOD as it relates to an Internal Server Error.)

"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:

<?php

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

// $Id: index.php,v 1.94 2007/12/26...

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:

<?php
if ($_SERVER['HTTP_HOST']==='some.domain.name.here') {
 
error_reporting(E_ALL);
 
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);

Log Files

Your log files can be accessed a few different places. This will vary depending on your host, but it's good to know what and where they are.

To access the files directly on the server, on some unix shells (you may need to alter this to suit your environment), you can type the following command:

tail /var/log/apache2/error.log

To check that you are looking at the right file, you may wish to type the following commands to find where the log files are.

grep 'ErrorLog' /etc/apache2/*
grep 'ErrorLog' /etc/apache2/*/*

Otherwise, if you are still able to access your admin pages through your site, which you often can during a WSOD, check the watchdog log for errors. For example you may see the 'headers already sent' error, which relates to the whitespace error (explained in the next section).

The path to your watchdog log, should you lose your admin menu is:

Your results will vary in different hosting environments, but this is a good starting point.

Whitespace at the End of a PHP File

The most common code error that causes a WSOD is having additional whitespace at the end of a PHP file. To avoid this issue, it is a Drupal coding standard to not include the closing ?> on a PHP file.

You may also have the 'Include Unicode Signature (BOM)' option turned on on your editor, which should be turned off.

PHP4 Syntax Errors and Incompatibility

Some versions of PHP4 gag on some function declaration syntax. Here are examples of syntax that fails:

function media_mover_api_media_mover($op, $action = null, $configuration = null, &$file = array(), $running_config = null ) { ...

function media_mover_api_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { ...

This appears to be a bug in PHP4 parser that makes it not be able to handle either too many "=" clauses in a function declaration or handle "&$..." So in at least some cases, this is a de facto PHP4 incompatibility.

Solution: Upgrade to PHP5.

PHP Versions

If you were previously running Drupal on a server with multiple versions of PHP you may have had special code in your .htaccess file telling Drupal which version to use. For instance, you may have added AddType x-mapp-php5 .php to your .htaccess file if your hosting provider required it to ensure PHP5 was used rather than PHP4.

If that is the case, remove this line in your .htaccess file.

Invisible Errors for Developers

If you are developing a module, you may first want to test loading your file(s) to make sure that there aren't any obvious PHP syntax errors. This happens because the include_once() or require_once() function calls simply do not always report the errors [if someone knows why and has a fix for that one, please add the info here!]. The following is the command you want to run on your system (it requires PHP console, or CLI, to be installed):

$ php <filename>

This command will ask PHP to parse your file. If you forgot a semi-colon ";", or a closing bracket "}" it will give you the error immediately. Fix it, and try again on your server.

Additionally, you can do check all *.php files for syntax errors. On *nix, run:

$ find . -type f -name '*.php' -exec php -l '{}' \;

Better yet, you may want to write an automated test to check for such errors. More info about Simpletest here.

Implement Hook Twice

You can also get a blank screen if you have by mistake implemented the same hook more than once. For example, accidentally implementing hook_help twice.

Output Buffering

Some modules need output buffering turned on.

To do this, try adding these lines to your .htaccess file (normally located in your root directory:

php_value output_buffering On
php_value output_handler mb_output_handler

Zend Compatibility Mode

If you get the WSOD while setting up a new server, you may have a problem with zend compatibility being on. If you check the error reporting you may see an error with "Trying to clone an uncloneable object of class mysqli." This is caused by the zend compatibility mode being On in the php.ini file.

To fix this, set zend compatibility to off by editing the applicable line:

; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
zend.ze1_compatibility_mode = Off

More detail about zend compatibility can be found here.

Clearing the Cache Table

Depending on the problem, clearing the cache table (via phpmyadmin for example) can resolve a WSOD.

Restarting Web server

WSOD can be caused by web server issues. Especially if you are using apache and PHP fails with error "undefined function: drupal_bootstrap() in ... index.php" but file includes/bootstrap.inc is in place with correct permissions, try restart (not just reload) web server.

Ionic Rewriter: WIMP

If you are using Drupal on a WIMP stack and getting the WSOD on the http://www.example.com/install.php page it may be that you cannot have the Ionic Rewriter ISAPI module installed in IIS during the Drupal install.

The solution in this case is to add it in after install is completed.

Malformed ctools plugins

Some malformed ctools plugins (for example custom panel layouts) can cause a WSOD. If you have any custom ctools plugins, try disabling them to see if they are the issue.

PHP Memory Limits

Another common reason for the WSOD is issues with memory limit. Traditionally, this has most often been a problem showing up (or rather, not showing up) in the modules admin screen, by it giving a WSOD. This issue has pretty much been solved for that page; however, there are still instances that will occur in other modules (usually showing up during admin actions like bulk updates) where PHP memory can be exhausted.

Try the solutions here first if this issue came up when you tried to go to the module page.

You may also want to try running the update.php script. If you do not know how to run update.php or your user does not have the permissions to run it (and you do not have the user1 login), there is more info about update.php here.

Next, you'll want to confirm that the change has had an effect with a phpinfo() page. If you are hosting the site and it didn't work, check that you were modifying the correct php.ini file (it's named in the phpinfo). If your site is hosted by someone else and you failed to increase the memory limit, then your host has probably locked it down (for good reason) and you'll have to negotiate with them. There may be a few work-arounds to try, like creating a custom php.ini, but it will vary from host to host.

PHP execution time limits

Another PHP setting that can lead to WSOD is max_execution_time. Apparently, on WAMP, the default is 30 seconds, but some administrative pages may take longer than that to process and load. Change this setting (see other sections on this page for instructions on how to change PHP settings in php.ini or using php_value() and do the same steps with this setting) to a larger value, and it might clear up your WSOD problems.

Module and Theme Related Errors

If the error is not originating from a memory limit, or any of the above errors, the error may be coming from bad code in a module or your site's theme.

Non-recommended Module Versions

If you are working with a module that is not in a recommended release version, you may have success by upgrading it to a recommended version or disabling/removing the module. To disable the module, simply go to the module admin page (Administer > Site Building > Modules) and uncheck the checkbox next to the module, then click "Save Configuration."

You can tell whether a module is recommended by looking on the module page, the version will have a green background with a green checkmark at the right, and say eg. "Recommended for 6.x." Particularly if the module is a development version, eg. "6.x-1.x-dev" it may not be recommended, and will then have a red background with an "x" at the right.

Name Clashes

Another possible cause for a blank page is a name clash, i.e. a module and a theme are using the same name. For example, if module "foo" implements hook_block() with foo_block() and there is also a theme "foo", then the theme engine will invoke foo_block() as the theme function to render a block. While foo_block() might not trigger a WSOD, foo_page() will.

No error messages are produced, because this is a wanted behavior of Drupal's theme system.

The solution in most cases is that if either the module or the theme (or both) are custom (created by yourself), rename it.

Character Encoding on template.php

If the error is as follows, particularly if the output started at line 1, it may be that the character encoding on your template.php file is not set correctly.

Cannot modify header information – headers already sent by (output started at .../sites/all/themes/THEME_NAME/template.php:1) in .../includes/common.inc on line 314.

This is most likely if you are using an editor such as Dreamweaver, in which case you should either set the encoding to utf8_unicode_ci or use a plain text editor to edit the template code.

Disabling Modules

Via the Module Administration Page in the UI

Disabling all the modules, then enabling them one by one can help narrow down a culprit module. To disable the module, simply go to the module admin page (Administer > Site Building > Modules) and uncheck the checkbox next to the module, then click "Save Configuration."

Via the Database

If your WSOD is caused by a specific module (e.g. you enabled a module, then got the white screen) and you cannot access the module admin page, it's usually effective to disable the module in the system table of the Drupal database by setting its status to 0 and then clear the cache table.

WSODs Due to Specific Modules

If you are using any of the following modules, you may want to look at these specific issues that have the potential to cause the WSOD.

FCKEditor + Webform

If FCKEditor is enabled when adding a new webform on Drupal 5, the 'Additional Processing' field under the 'Webform advanced settings' fieldgroup gets the value of <br /> by default. This causes a blank screen when the form is submitted. To remedy, delete the <br /> from the field.

Node Access

If you have just enabled or disabled node access module and get the WSOD when attempting to update, you may need to rebuild node permissions. You can do this one of two ways.

First, you can rebuild permissions via the "Rebuild Permissions" button under "Node Access Status" on the Post Settings page at http://www.example.com/admin/content/node-settings.

Alternately, you can use a script to update the db node permissions table:

<?php
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
user_authenticate('admin', 'admin');
$actual=db_result(db_query("SELECT nid FROM {node} WHERE nid > %d ORDER BY nid",$_GET['node']));
if (
$actual>0) {
 
$sencer=node_load($actual);

 
node_access_acquire_grants($sencer);
}
?>
<html>
<head>
<script type="text/javascript">
<!--
function delayer(){
    window.location = "rebuild_permissions.php?node=<?=$actual?>"
}
//-->
</script>
</head>
<body <?=($actual>0 ? " onLoad=\"setTimeout('delayer()', 500)\"" : "") ?>>
<?php
if ($actual>0) echo "doing... ".$actual;
else echo
"Done";
?>

</body>
</html>

Gallery 2 (Embedded)

If you are using embedded Gallery 2, you have to edit gallerydirectory/config.php to point to the new database server. If you do not do this, you may get the WSOD without any errors (after enabling errors as above).

PEAR Wiki Filter

If you have moved your module directory, the PEAR Wiki filter will not be able to find the PEAR modules (assuming you installed them underneath the module directory.)

Check your input format in the admin pages and make sure that the "Path of PEAR packages" is correct.

WSOD on Multisite Installs

If this happens during installation or when starting a multi-site configuration where you are sharing databases or database tables, the reason may also be in the settings.php file in the sites/yoursite/ directory. This happens if you have already edited the $db_url variable in settings.php. The installer will no longer be automatically invoked, because Drupal assumes installation has already been completed.

If you get the following error messages for example (Drupal 6), the above may be the reason:

PHP Warning: Table 'testing.access' doesn't exist
query: SELECT 1 FROM access WHERE type = 'host' AND LOWER('127.0.0.1') LIKE LOWER(mask) AND status = 0 LIMIT 0, 1 in C:\\My_webdev\\htdocs\\drupal\\includes\\database.mysql.inc on line 128
PHP Warning: Table 'testing.users' doesn't exist
query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = 'da5qecc9rsf1dinhb4ko1e5dm0' in C:\\My_webdev\\htdocs\\drupal\\includes\\database.mysql.inc on line 128
PHP Warning: Table 'testing.cache' doesn't exist
query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'variables' in C:\\My_webdev\\htdocs\\drupal\\includes\\database.mysql.inc on line 128
PHP Warning: Table 'testing.variable' doesn't exist
query: SELECT * FROM variable in C:\\My_webdev\\htdocs\\drupal\\includes\\database.mysql.inc on line 128
PHP Notice: Undefined variable: variables in C:\\My_webdev\\htdocs\\drupal\\includes\\bootstrap.inc on line 427
PHP Warning: Table 'testing.cache' doesn't exist
query: UPDATE cache SET data = '', created = 1209809924, expire = 0, headers = '', serialized = 0 WHERE cid = 'variables' in C:\\My_webdev\\htdocs\\drupal\\includes\\database.mysql.inc on line 128
PHP Notice: Undefined variable: variables in C:\\My_webdev\\htdocs\\drupal\\includes\\bootstrap.inc on line 434
PHP Warning: Table 'testing.system' doesn't exist
query: SELECT name, filename, throttle FROM system WHERE type = 'module' AND status = 1 AND bootstrap = 1 ORDER BY weight ASC, filename ASC in C:\\My_webdev\\htdocs\\drupal\\includes\\database.mysql.inc on line 128
PHP Warning: Table 'testing.url_alias' doesn't exist
query: SELECT COUNT(pid) FROM url_alias in C:\\My_webdev\\htdocs\\drupal\\includes\\database.mysql.inc on line 128

WSOD on Cloned or Duplicate Sites

There are a few possible culprits for a WSOD on cloned sites.

Include Paths

If you have created a new Drupal site by copying the files from an install and then importing the db over, and then edited the settings.php file with your new db info, you may still end up with the WSOD.

The pathauto module has caused problems in this scenario, where it throws fatal errors because of missing includes. In this case, adding this line to the .htaccess file solves the problem instantaneously (the right base path for your own server may be obtained through info.php or by logging into your control panel):

php_value include_path '.:/var/www/vhosts/example.com/httpdocs'

Missing Database Tables

If you are moving a large site and using phpmyadmin to import the DB, it may have either hanged and timed out or caused some tables not be be loaded into the db. to begin, be sure to double check your db to see if all the tables are there.

If moving a large site with a huge db then better import the db via a console (command line), as phpmyadmin is not always able to handle large db files.

Relic index.html Files, and Server Setup

Sometimes a server will be setup with a blank index.html file in the root directory, and/or Apache may not be configured to search for index.php files with the DirectoryIndex directive. It can look like a WSOD, but really is just an empty page.

To check if this is the case, navigate to http://www.example.com/index.php or look for an index.html file in your root directory. If there is an index.html file, make a copy of it outside your root folder, and then delete it and see if it resolves the issue.

Infinite Loops in your Code

If your site gets a WSOD after a CPanel system update, with notices like this in the error log:

[notice] child pid ##### exit signal Illegal instruction (4)

You may have an infinite loop. Apache has become smart enough to detect this and terminate the script without waiting for a timeout.

You can try disabling modules in the system table until you find the offending module, or put a call to watchdog at the start of every function call in the module, so you can trace the call chain by looking at the watchdog table. If you find a repeating call pattern, look through the code for a loop cycling, eg. node_load through hook_nodeapi and/or other functions, and repeating node_load again.

PHP Timeout

The default PHP timeout defined in php.ini is 30 seconds. This is too short for some activities like listing/enabling modules.

Here are details on how to increase the maximum execution time.

Inappropriate naming of functions

Defining a custom function in your module code which acts as a Drupal hook function may result in WSOD. Check that the functions, that you define in your module do not use _menu, _auth or other extensions if they are not meant to implement that specific hook.

The following code generetase WSOD and Apache segfault in Drupal 5.

function mymodule_menu() {
  array(
    'path' => 'auth'
    'callback' => 'mymodule_auth'
  );
}

function mymodule_auth() {
  drupal_execute('user_login', array('name' => $_POST['name'], 'pass' => $_POST['pass']));
}

Usage of PHP short open tag

Sometime ,mostly when moving to new server, you will get white screen. This may be because of usage of short open tag

<?

instead of
<?php

Solution : edit php.ini and enable short open tag

short_open_tag=On

Any other solutions available?

If above information was not helpful enough, you may follow the next article which is dealing with WSOD diagnostic solutions:
http://drupal.org/node/482956 - Silent WSODs (White Screen of Death) - fixing step by step

Comments

Imagecache problems

I would like to add that I was having this problem with an old project in a new PC.

The problem was that I didn't have the "files" directory created (which I had to create manually).
After that I didn't have any problems anymore.

I hope this helps!
www.twitter.com/raffuk

-Raff

D7 WSOD's on Config and Status access

Hey guys, complete newb here, i love the potential drupal promises, i wanna learn bla bla.
So while studying d7 (started about a week ago) i came across this WSOD when trying to access config. At first i thought it's not that important, then i was focusing on learning stuff like modules and how to organize this or that,but now i'm getting this error and I'm hoping you guys can help. THe error occurs while accessing
http://localhost/drupal7/#overlay=admin/config and

http://localhost/drupal7/admin/reports/status
(wamp server installation)
And that's all, i added some content, blogs and so on, i can access anything in the 'administer' section but not these two. I tried to add php_value output_buffering On
php_value output_handler mb_output_handler to the .htaccess file within the drupal7 root directory (at the end of the text) as well as adding php_value memory_limit 64M at the end. After trying this and failing, i left it as it was initially. This is all i could try so far given my poor php/server etc skills.
Any help would be greatly appreciated though. You ppl are awesome btw.
Edit: Resolved with upgrade of PHP, installed the newest wamp server. Now running 2 wamp servers, one for d6, the other for d7.

WSOD on status and config page D7

Seems like the requirements hooks of each module are called on the status and config pages. So if you get a white screen on those, it's probably in one of those functions.
In my case it was the l10n_update module which took too long and made the mysql connection time out. Because of this there was a "Mysql server has gone away" error for the "SELECT * FROM {l10n_update_file}" query.

Hi Yaron, I'm getting the

Hi Yaron,

I'm getting the same problem. How did you sort it out?
I changed the drupal_set_time_limit in the file l10n_update.locale.inc but the problem persists.

Thanks in advance,

Turn off the module. In my

Turn off the module. In my case the firewall was blocking the outgoing request and made it time-out. You could try to figure out the url and allow it in your firewall, but it could also be some other problem in your case.

White screen on admin pages fix

I was finding a local copy of my Drupal 6 site was white screening when trying to load any of the admin pages.

Turned out to be related to the Devel or Theme developer modules. To fix without access to the admin pages I used the following Drush command: drush disable devel

White screen on admin pages fix

Hi bkno,

I'm having the same problem and it is related to Devel..I actually got the WSOD after installing it..
Could you please tell me more about this Drush command?

I'm a Drush newbie..I just downloaded it and extracted it to my modules folder but I have no idea where to type that command..

Thanks in advance!

HatemDh

WSOD on login from date_api

It is common to get a WSOD directly after login if you have the date_api module installed, and are running php 4.x / 5.0 / 5.1, but have not enabled the "date php4" module. This can be particularly sneaky if your dev environ is php 5.2 and your deployment environment is still php 4

Unsupported operand types in Drupal 6.x

i got the dreaded white screen after I used D5 API calls in a custom block on my D6 site.

enabled error reporting (in index.php) & got this message "Fatal Error: Unsupported operand types in /includes/common.inc on line..."

a bit of searching gave me a quick patch - http://justinhileman.info/articles/unsupported-operand-types-in-drupal-6x

there are different reasons for drupal throwing a blank screen, hope this helps anyone getting one because of legacy calls :)

-
silence != inaction

Be careful with menu callbacks invoked by hook_menu

In your module code be careful with menu callbacks invoked by hook_menu(). Your callback function must return a value.

In the example below, if you omit the return statement, you will get the BSOD.

function my_menu() {
   ...
  $items['my/menu/path/%'] = array(
    'title'             => 'my title',
    'page callback'     => 'my_callback_function',
    'page arguments'    => array(3),
    'access callback'   => TRUE,
    'type'              => MENU_CALLBACK,
   );

   ...
}
   ...

function my_callback_function($param) {
  ...
  return '';
}

Harry Levinson

Thanks for your script!

On my huge website (80.000 users, 10.000 nodes), Drupal had the same white screen symptoms when rebuilding rights.

Since the version 6, check right permissions on previous script version was no longer working.

Here is the updated Drupal 6 version with some improvements I've made:
- the mandatory DELETE FROM {node_access} before rebuilding
- time remaining
- percentage status
- localization support
- custom script name in root directory

--
Mike

<?php
# Load Drupal functions
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);


# Check permissions to access this page
if (!empty($update_free_access) || $user->uid != 1) {
  require
'./update.php';
  exit;
}


# Retrieve node index in the nodes table and time started
$index = (!isset($_GET['index']) || !is_numeric($_GET['index']) || $_GET['index']<0) ? 0 : $_GET['index'];
$t = (!isset($_GET['t']) || !is_numeric($_GET['t']) || $_GET['t']<0) ? time() : $_GET['t'];


# First launch : flush node_access table and caches
if($index==0) {
 
node_access_needs_rebuild(TRUE);
 
db_query("DELETE FROM {node_access}");
}


# Fetch next node to rebuild grants
#$actual  = db_result(db_query("SELECT nid FROM {node} WHERE nid > %d ORDER BY nid",$_GET['node']));
$actual  = db_result(db_query_range("SELECT nid FROM {node} ORDER BY nid", $index, 1));
$total   = db_result(db_query("SELECT COUNT(nid) FROM {node}"));
$percent = ($total > 0) ? ($index/$total*100) : 100;
$time    = (floor($percent)) ? format_interval((time()-$t)/$percent*(100-$percent)) : t("caclulating...");


if (
$actual>0) {
 
# Update actual node grants
 
$node=node_load($actual);
 
node_access_acquire_grants($node);
} else {
 
# Finishing : remove 'rebuild permissions' warning
 
node_access_needs_rebuild(FALSE);
 
drupal_flush_all_caches();
}


/*
# Old method
set_time_limit(0);
db_query("DELETE FROM {node_access}");
node_access_rebuild();
*/


?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo t("Rebuilding nodes permissions !percent%", array('!percent' => floor($percent))); ?></title>
<script type="text/javascript">
<!--
function delayer(){
    window.location = "<?php echo $_SERVER["SCRIPT_NAME"]."?t=$t&index=".($index+1); ?>"
}
//-->
</script>
</head>
<body <?php echo ($actual>0 && !isset($_GET['stop'])) ? " onLoad=\"setTimeout('delayer()', 0)\"" : ""; ?>>
<?php
if ($actual>0) echo nl2br(t("Rebuilding nodes access rights... !percent% (!index / !total)\nStarted on !started. Estimation of time remaining: %time", array('!percent' => floor($percent), '!index' => $index, '!total' => $total, '!started' => format_date($t), '%time' => $time, )));
else echo
nl2br(t("Nodes access rights rebuilding: <b>done in !elapsed.</b>\nStarted on !started. Finished on !ended",
  array(
'!elapsed'=>format_interval((time()-$t)),'!started' => format_date($t), '!ended' => format_date(time()))));
?>

</body>
</html>

I can't delete a copy of

I can't delete a copy of drupal core from my modules directory without getting the WSOD. It looks like the system and user modules are getting picked or used in some way. I'm not sure how this even got into my default/modules directory probably from an upgrade from 6.15 to 6.16 but before I start from scratch, if anyone knows how to deal with this, please advise. thanks!

i have a fresh copy of drupal running with only this freakin' thing in my default/modules folder

i figured out that i had upgraded previously from 6.15 to 6.16 which is why there was a copy of core in my /default/modules. now i am setting up a new developing environment on a new machine with a fresh copy of 6.16 and can't load my sites from previous one. i tried fixing all the paths in mysql but still getting a huge number of errors. any help would be greatly appreciated here. also for what its worth i am on php 5.3 and i know there are issues, but still there are some modules which are looking for that copy of core in /default/modules and i don't see where to change their path.

You're not going to believe this.

I removed 5 blank lines at the end of template.php and it fixed my WSOD.

Fixed!

I tried everything in this guide and others to fix a theme-related WSOD I was getting after each administrative submit, such as enabling a menu item, or disabling a module. Turns out the problem was in the template.php file. Believe it or not, the following snip seems to have caused the problem.

Bad code:

<?php
function theme_x_menu_local_task($link, $active = FALSE) {
  return
'<li '. ($active ? 'class="active" ' : '') .'><span><span>'. $link ."</span></span></li>\n";
}
?>


<?php
function theme_x_l($text, $path, $options = array()) {\\etc

The closing ?>, the blank line, and the <?php tags caused the WSOD. Deleting them resolved the issue.

Good code:

<?php
function theme_x_menu_local_task($link, $active = FALSE) {
  return '<li '. ($active ? 'class="active" ' : '') .'><span><span>'. $link ."</span></span></li>\n";
}
function theme_x_l($text, $path, $options = array()) {\\etc

I hope this helps someone!

This also fixed it for

This also fixed it for me!!.
Thanks!!.

Just one, single opening "<?php " in template.php.

It must consider the whitespaces as header elements or something like that...

Where is this file?

I know this is going to make me go "DUH" once I get the answer, but I can't seem to find the template.php file. Where is it located?? Thanks.

template.php

Did you ever find out where template.php is located? I'm having WSOD issues - I''d like to try your solution.

OK
jasnpast

template.php

Try

"public_html/sites/all/themes/yourtheme".

Hi,

i got stuck with I WSOD when I submitted a from. Fortunality I figurred out the reason, but I do not understand the behaviour.

The form was generated with

$form = array(
  ...
  '#tree' => TRUE,
  '...',
);

I can't provide any explanations on that, but hopfully it will save you time. It's worth a check...

good documentation for wsod

it took about 3 minutes to find out why a site i worked on was wsod-ed. drupal has great documentation.

Madalin Ignisca

http://www.webgrid.ro/

Clear the Cache

Recently got a WSOD from a module with a bug in it. I manually disabled the module in the system table, but it still didn't work. I manually truncated all of the drupal cache tables, and it fixed it.

How do you do this?

Pardon my lack of web server intelligence, but how do you clear the cache when you don't have phpMyAdmin working and have a white screen?? Thanks in advance!

for the record the SQL would be some or all of:

truncate cache;
truncate cache_block;
truncate cache_filter;
truncate cache_form;
truncate cache_menu;
truncate cache_page;
truncate cache_update;

I had this issue where I

I had this issue where I cloned a site and was getting a WSOD on the copy. Although I cleared the cache in the source drupal site before copying I still got a WSOD. I happened to have drush installed (I have ssh access) and I cd'ed into my drupal site's root directory and was able to issue a "drush status" command which said everything was ok. Then I issued a "drush clear-cache" command and chose the option to clear All the caches. Immediately after doing this the WSOD went away and I was able to access my cloned site. Just wanted to put that out there as an option instead of messing with the database... a lot easier.

I'm starting to like this drush thing. It was cool because even though I had my site WSOD'ed and the admin was completely inaccessible, I could still manipulate my site via drush (for example I was also able to take it in and out of maintenance mode via drush)

WSOD running update.php

My problem was WSOD when running update.php in D6 (on several different websites on different platforms).

Finally tracked it down to a series of broken function calls in the Garland theme. Don't know why they are broken. Don't care.

Apparently installation and update require the Garland maintenance-page.tpl.php. But once you are installed, there is no need to have a bloated maintenance-page.tpl.php to run update.php.

I replaced your_site_root/themes/garland/maintenance-page.tpl.php with a greatly simplified page, one that only does what is needed -- nothing more. And now update.php works just mighty fine.

So here is your easy-peasy replacement:

<?php

/**
* update pages depend on this file.
*/
?>
<html>
<head>
<title><?php print $head_title ?></title>
</head>
<body style="margin:100px;">
<?php print $content ?>
<hr>
<?php print $footer_message . $footer ?>
</body>
</html>

cos

BEST WAY TO REMOVE WHITE SCREEN OF DRUPAL SITES

OPEN YOUR .htaccess file and find out php_value memory_limit and increase limit upto php_value memory_limit 64M
Your site should be running successfully.

Website Designer (Drupal Themer)
Extensive professionals
info@extensiveprofessionals.com

Hey I can't find that line on

Hey I can't find that line on the .htacess file...

# PHP 4, Apache 1.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0

# PHP 4, Apache 2.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0

# PHP 5, Apache 1 and 2.

php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0

just copy/paste that line at

just copy/paste that line at the bottom of the section of text that you've included here.

I just switched servers and

I just switched servers and this did the trick.

Thanks!

WSOD and Drupal Tweaks module

We moved our site (voiceseducation.org) from one host to another. When we did so, we had a serious and repeated problem with multiple errors and then with WSOD. The problem turned out to be the Drupal Tweaks module. Once we deleted that module and re-imported the database to the new site, all was fine.

Make sure your function is returning required values

In my case, I wasn't returning the form. Instead my code was:

function mymodule_page($id) {
//... 
  drupal_get_form('mymodule_form');
}

... when it should have been:

function mymodule_page($id) {
//... 
  return drupal_get_form('mymodule_form');
}

This will cause a WSOD that produces no errors written to the php or apache logs.

.htaccess file

This is very useful. I had WSOD when I migrated from one host to another. It turned out to be the .htaccess file which was working fine on the old host but the line AddType x-mapp-php5 .php stopped any php from working including Drupal.

I also had an issue with the location of php.ini. Luckily the hoster told me where to put that but for the above problem they refused to assist with "customer coding". I think it's configuration information that we need to know from the host - otherwise how would we know how they have apache set up??

Julie

Panels

I got the WSOD after upgrading panels, which totally wiped out my custom layout. Why it has to delete that folder I've no idea.

Re-uploaded the layout (backup and migrate saved a copy of the module), re-saved desired layout and content and everything is now fine.

EDIT: Oops, really should have put my custom layout in my own themes folder: http://drupal.org/node/495654

White Screen of Death due to postgres 9

Drupal 6.x & postgres 9.x. is a bad combination.

If you enable error reporting you will see something like:
Notice: unserialize(): Error at offset 0 of 1927 bytes in .../includes/cache.inc on line 33

Thanks for the good hints.

Update Module = WSOD - Our Fix

We had an issue with the wsod whenever we enabled the update module. All of our public pages were visible just fine, however we could not access any admin pages, all were wsod. We are on shared host, went round and round with them, they finally told us our queries were taking too long to execute their timeout limit was 10 seconds.

Eventually found this post, and edited the two files, this instantly cleared up our wsod issues with the update module.

here is the post:
I have seen the "MySQL server
Posted by cog.rusty on April 23, 2009 at 3:43pm

I have seen the "MySQL server has gone away" error on a couple of cheap shared hosting accounts where they had set wait_timeout=15 to save connections. By the way, MySQL's default is wait_timeout=28800. 15 is a bit too drastic.

Since I had no access to MySQL's settings, I had to hack Drupal core to fix it.

In includes/database.mysql.inc, at the end of function db_connect(), under the "SET NAMES" line:
mysql_query('SET SESSION wait_timeout = 60', $connection);

In includes/database.mysqli.inc, at the end of function db_connect(), under the "SET NAMES" line:
mysqli_query($connection, 'SET SESSION wait_timeout = 60');

I guess someone with more PHP experience that me could suggest a patch to check if wait_timeout is too low and fix it in some economic way.

Unserializing does not work on Postgresql 9...

Unserializing does not work on Postgresql 9 when bytea_output is 'hex'. To make Drupal 6 work in this case, open a PostgreSQL console and enter the following command:

ALTER DATABASE [your_database] SET bytea_output = 'escape';

This makes the bytea_output compatible with Drupal 6.

Cheers,
Miklós

http://portalsoft.hu

That did the trick!

That did the trick!

Use dtools & wsod module for errors to show up

I was debugging a white screen of death (WSOD) problem a couple days ago and putting:

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

in the settings.php file still didn't display any errors.

But, installing the dtools

http://drupal.org/project/dtools

and enabling the wsod module in that package did show the errors.

Hopefully that will help someone!
Kristen

-Kristen
Blog: http://kristen.org
Drupal 7 Multilingual Sites: http://kristen.org/book

Drupal Commons

I had this problem, turns out it's related to Drupal Commons. The solution: http://drupal.org/node/944630#comment-3590654

If you're too lazy to click on the link: flush the cache and make sure that Acquia Commons and Fusion Core themes are both enabled (even if you're using a different theme.)

White Screen Of Death

I spent a considerable amount of time trying to figure out why when I installed Ctools or Views...my screen would turn white. I actually have trying to find the right path or change appropriate files...I just want to design. With that said i found out the problem was not enough memory. I fixed it by using the

Drupal Module - Drupal Tweaks

I bumped up my Default PHP memory limit. If this can help anyone else that reads these posts as sweat drips from their brows because they are on a deadline and can't figure this s*&@! out my time hasn't been totally wasted.

BTW thank you to the developers of that module you should be at the beginning of the list with a big thing that says if you get the White Screen of death or a memory error message TRY THIS MODULE
The whole reason I started using Drupal was to hopefully illiminate the hours of tweaking

KISS
(Keep It Simple Stupid)

White Screen of Dead issue

After enable err report, it prompts as following.

Warning: Can't find file: './C300131_pro/access.frm' (errno: 13) query: SELECT 1 FROM access WHERE type = 'host' AND LOWER('110.206.207.32') LIKE LOWER(mask) AND status = 0 LIMIT 0, 1 in /hsphere/local/home/c300131/product-reviewers-online.com/includes/database.mysqli.inc on line 135 Warning: Can't find file: './C300131_pro/users.frm' (errno: 13) query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = '427f0oeeadvmchspp0e8acl6i4' in /hsphere/local/home/c300131/product-reviewers-online.com/includes/database.mysqli.inc on line 135 Warning: Can't find file: './C300131_pro/cache.frm' (errno: 13) query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'variables' in /hsphere/local/home/c300131/product-reviewers-online.com/includes/database.mysqli.inc on line 135 Warning: Can't find file: './C300131_pro/variable.frm' (errno: 13) query: SELECT * FROM variable in /hsphere/local/home/c300131/product-reviewers-online.com/includes/database.mysqli.inc on line 135 Notice: Undefined variable: variables in /hsphere/local/home/c300131/product-reviewers-online.com/includes/bootstrap.inc on line 558 Warning: Can't find file: './C300131_pro/cache.frm' (errno: 13) query: UPDATE cache SET data = '', created = 1299725435, expire = 0, headers = '', serialized = 0 WHERE cid = 'variables' in /hsphere/local/home/c300131/product-reviewers-online.com/includes/database.mysqli.inc on line 135 Notice: Undefined variable: variables in /hsphere/local/home/c300131/product-reviewers-online.com/includes/bootstrap.inc on line 565 Warning: Can't find file: './C300131_pro/system.frm' (errno: 13) query: SELECT name, filename, throttle FROM system WHERE type = 'module' AND status = 1 AND bootstrap = 1 ORDER BY weight ASC, filename ASC in /hsphere/local/home/c300131/product-reviewers-online.com/includes/database.mysqli.inc on line 135 Warning: Can't find file: './C300131_pro/url_alias.frm' (errno: 13) query: SELECT COUNT(pid) FROM url_alias in /hsphere/local/home/c300131/product-reviewers-online.com/includes/database.mysqli.inc on line 135

What's the problem?

After installing Drupal 7 I first encountered a problem with adding content. Only part of it was appearing, and there was no way to edit content. After experimenting with several themes (now on Danland) I get the WSOD whenever I try to add any content. I have tried many of the suggestions in this thread and so far no joy. Site is http://nullifynow.net

constitution.org
jonroland.org

Ran diagnostic test on problem

Did a block functionality test and got fatal error:

The test did not complete due to a fatal error. Completion check block.test 46 BlockTestCase->testCustomBlock()

Also got:

Use the Clean environment button to clean-up temporary files and tables.

My question is, now what? The way forward is not clear.

constitution.org
jonroland.org

Next a test on Update Core Functionality

Got the error:

The test did not complete due to a fatal error. Completion check update.test 85 UpdateCoreTestCase->testNormalUpdateAvailable()

Again, now what? Should I just uninstall Drupal7 and start over? Or go back to Drupal6?

constitution.org
jonroland.org

Hi
After I disabled it ..I can see the blocks page now..I Still need to use "Apache Solr "
Thanks

My solve for my WSOD issue

I had a problem where I'd get a WSOD after submitting a button click for something like "Save Blocks" after modifying their positions. I tried to enable some error logging in some of my php files, but that made things worse. The problem showed up in my template.php file in my theme's root folder. I simply replaced that template.php file with the original one in my theme folder on my local machine. When it was replaced, everything popped back to normal again.

When I transferred by website

When I transferred by website from localhost to a live server, I got the WSOD when trying to edit account information. I performed a permissions rebuild and it fixed the issue.

Fix not mentioned...

Not that this is a real fix for a live site, but on my development laptop I restart the Apache server.

I'm newbie to D and while I learn the framework, I am also using a D install as CMS for various personal notes. This D site is currently fully operational. Once in a while, I discover the WSOD, or appearance of it, and (through a process of elimination) determined a fix is to restart Apache. Because this is my own project, I am completely aware of when Im in a dev cycle or simply using D for the above mentioned CMS testing.

My install is D 6.x on LAMP with a whop'n 256 RAM.
woot!
X

Anyone else experiencing this issue? Chrome and Firefox are working just fine. Originally we thought it was due to a path alias, as it happened every time if we added a "/" (ie: foo/foobar) to the core path alias data. We removed that, and those links work fine in IE (we've only tried IE 8 at the moment), though now the site is doing the the 500 Internal Service Error seemingly at random (after several page loads on the site). The site is then inaccessible from that point on. If I clear the cookies, I can get access back for a little bit (again seemingly random on when it occurs).

Let me know if you need more information - we are on a shared hosted server - Fatcow and have set the php.ini to our allowed memory max of 64M. I've gone through everything on this thread that could be an issue to no avail (fixed a problem in my template.php file, removed extra spaces in my sub-theme files).

I've only added content to the site (created a content type), released modules and a sub-theme. Any help is appreciated.

500 internal server error appears as follows:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, cgiadmin@yourhostingaccount.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Brak

This was my case - WSOD when I tried to change colors in Garland or other themes on Drupal 6.x running on FreeBSD. No information in Drupal or PHP logs. In the log of Apache there was this line:

[notice] child pid xxxxx exit signal Abort trap (6)

After investigation the cause was detected: imagecreatefrompng () caused PHP to core dump because PNG updated after PHP was installed.

Rebuilding of PNG and everything that depends on it fixed the issue:

portmaster -r png

One more solution

Drupal 5.23, PHP 5.3.0, MySQL 5.1.36, Apache/2.2.11
(yes, Drupal 5.x works on PHP 5.3, just disable errors from showing in your prod.server)

Effect: totally blank page (no errors) when going to Administer -- Logs -- Status report

fix:
in includes/theme.inc, find line

call_user_func_array($functions[$function], $args);

and replace with

call_user_func_array($functions[$function], &$args);

(note the only change is a "&" before $args)

Thanks

Thanks

Rajab Natshah
rajab.natshah.com

I am experiencing this so

I am experiencing this so called WSOD when I try and load my /admin page or anything that follows the '/admin' extension.

I have not changed anything on the site. The site has been running but it is around 6 weeks since I've used the site. Previously the /admin section loaded but now it won't.

From a visitors point of view the site is working fine.

Any suggestions?
Thanks, Tom

OG module

I'm experiencing widespread WSOD all the sudden on cloned sites that have been up for years. Anything related the the OG module comes up blank. Has anyone had this problem before with OG?

Drupal 7 + Devel module

For those of you have Drupal 7 and Devel installed.

I tried to develop my site in localhost and upload my site to a remote server. It just show blanked page and nothing. Wasted my 2 hours figuring why.

To fix the problem, if you have Devel module installed like my case, try to disable the Devel module before exporting your database.

p.s. I have tried to manually disable the Devel module in the database, but it won't work.

Hope it helps.

PHP MEMORY

I've had this nasty problem the last weekend. I recomment you all to check the size of PHP memory. If I had done this at the beginning I would have found the solution sooner.

Thanks!

Helped me a lot!

Hi,

Drupal site shows white blank page after Login and logout. I have try all Suggestions from http://drupal.org/node/158043. But i have not found solution for white blank page after Login and Logout.

Any help.

Thank you,
Rahul Barge

chek your PHP memori, 128 MB

chek your PHP memori, 128 MB is recomended for large modules.

ꦱꦠꦽꦶꦪ

Thanks for your reply,yes my memory_limit

Thank you for your reply, yes my memory_limit was ini_set('memory_limit', '100M');
I set it 128M then also it shows white blank page. But when i set PHP memory, 128MB INSTEAD of 128M it shows me Server error.

Thank you,
Rahul Barge

It should be "M" no "MB" if I

It should be "M" no "MB" if I remember correctly (php.ini), try a higher value than 128 assuming your webhost allows it, most shared hosting limits PHP memory to 64M.

PHP memori, 128 MB

Where do I find It?

Ricardo Ewertz

Drush Can Display Watchdog Entries

For a recent WSOD I had to deal with, I ended up finding my issue via the Watchdog entries. Drush helped me with this:

drush @dev watchdog-show --count=5

The above showed me:


Id Date Severity Type Message
430 13/Nov 16:02 warning php Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'mymodule_overview_page' was given in menu_execute_active_handler() (line 50)

My root cause: I hadn't yet defined the page callback 'mymodule_overview_page'. D'oh!

Rick Umali

headers already sent - BOM

I had the "headers already sent" error in my log but could not find where the script output was happening before the headers were sent. I enabled output buffering by putting output_buffering = On in php.ini (putting ob_start(); at the beginning of index.php would probably also work). Then in includes/common.inc, function drupal_goto, before call to the "header" function I put:

$badoutput = ob_get_clean();
if ($badoutput !== '') {
  $hex = bin2hex($badoutput);
  die("drupal_goto - output generated before Location header: /$badoutput/, hex=$hex.");
}

to find the extraneous output. It was in fact a byte-order mark (BOM) of efbbbf that my text editor (notepad++) was invisibly adding to the front of a custom module source file before the <?php tag. Using Encoding >> Encode in UTF-8 Without BOM solved problem.

APC and/or suhoshin

After running into this typical error too often ....

I wonder if the solution is not time-related or dependant on the number of restarts of the webserver.A few apparent tips and tricks below

? try and clear all caches ( drush -l http://hostname.dom cc all )
? clear the browser cache ( just cache, no passwords or forms or anything other )
? Is the web-user permitted to access all pages ( chow user:group /drupalpath -R )
? Is this suhoshin patch activated and are there any extra settings in suhoshin.ini set, multi_header = 1 does cause problems

[VERIFIED] though at first seemingly unusual disabling - enabling the 'update module' does indeed seem to be critical to the WSOD , this was not affected by the boost module i've tested or a module ( trigger ) in the same category as 'update manager' , the module itself does not depend on anything else. This module ( update manager ) has no author ....

Indicative for this problem is indeed :

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 42 bytes) in /var/www/cms/includes/menu.inc on line 3537
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 42 bytes) in
/var/www/cms/includes/menu.inc, line 3537

- - -
whenever you say drupal I shrug

? FIX ( partial / temporary )

use Allowoverride All in the virtual host to enable .htaccess (blushing)

check here http://drupal.org/node/256410
and here for more http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride

This fixed the problem for quite some time, for very unkown reasons the problem re-occured, enabling-disabling the update-module no longer is of any effect after the above mentioned changes were performed.
[ update ] disabling mod-security compensates for the intermittent part for this issue completely, no logs so far to indicate root cause, investigation continues
[ update ] reinstalled mod-security as this was a manual install, the problem seems fixed ... for now ?

Leaves the Error: Allowed memory size of 67108864 bytes exhausted (tried to allocate ... bytes) in .... that seems to cause it all.

- - -
whenever you say drupal I shrug

Hostgator

On Hostgator I needed at at the following to .htaccess in public_html for the install to proceed. Without it WSOD after entering database information.

# Use PHP 5.3
Action application/x-hg-php53 /cgi-sys/php53
AddHandler application/x-hg-php53 .php

# Disables existing custom php.ini and
# tells it to use the default PHP 5.3 php.ini instead.

suPHP_ConfigPath /opt/php53/lib

order allow,deny
deny from all

I think the easiest way to make drupal show the errors is to add the following lines to the end of settings.php :

error_reporting(-1);
$conf['error_level'] = 2;
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

Thanks, you made my day less

Thanks, you made my day less "white"!

;)

same but different

Hello.

I am trying to move my site from one server to another.
during the transfer I got WSOD .
after enabling error reporting I got this:

Fatal error: Class 'XMLWriter' not found in /var/www/vhosts/mywall.co.il/webapps/mywall/sites/all/modules/xmlsitemap/xmlsitemap.xmlsitemap.inc on line 15

so I tried re-copying the xmlsitemap module. but it did not help .
this is the site:
http://mywall.talr.co.il/

working site: http://mywall.co.il/

Any ideas ?

Thanks
Angel

forcing error display

The suggestion above for forcing error display also worked to show up the proximate error in a complete installation process when added to install.php, which is handy to know. (Not that it helped work out what the actual problem was, but it gives a sense of scope.)

Nice... Thanks!!!

It Works for Me. Thanks a lot!!

WSOD - Only on my computer !!!

I have recently installed my site at hostagor.com using ftp with Filezilla.
I use a Mac Book Pro to access my site but I uploaded the drupal files using my iMac with another internet connection.
The problem is that I can't access my site from my Mac Book where my Acquia Dev Desktop C P is installed.
I can access the local site thru Acquia Dev Desktop CP though.
I tried to access it using Firefox, Chrome, Opera and Safari. Neither one can access my site on my Mac Book. I have redefined Safari and cleared cash files for all browser more than one time before trying to reach my site.
Nevertheless any other computer using any browser can access my site. No problem on that. So I have figured that the problem may be on my computer but I don't know why and how to fix it.
I searched a lot of comments but none of those those mentioned the problem that I am facing here.
Can anyone please help me? Thanks in advance, Bernardo.

In my case - update from drupal 6.19 to 6.24, averything was OK untill I enabled custom theme. I found solution -
go to index.php and add the following lines after <?php

ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);

Than I got errors:
Notice: unserialize() [function.unserialize]: Error at offset 2 of 16 bytes in /includes/bootstrap.inc on line 556

Warning: Cannot modify header information - headers already sent by (output started at /includes/bootstrap.inc:556) in /includes/bootstrap.inc on line 726

Warning: Cannot modify header information - headers already sent by (output started at /includes/bootstrap.inc:556) in /includes/bootstrap.inc on line 727

Warning: Cannot modify header information - headers already sent by (output started at /includes/bootstrap.inc:556) in /includes/bootstrap.inc on line 728

Warning: Cannot modify header information - headers already sent by (output started at /includes/bootstrap.inc:556) in /includes/bootstrap.inc on line 729

So I deleted DataBase and imported backup, even this time didn't turn off modules before php.update as with small update it's not necessary, update went OK, still got errors in head, so installed module:
http://drupal.org/project/variablecheck

and found one bad variable:
simplenews_from_name_39 s:14:"4grow.pl";
so went to phpMyAdmin to variable table, found the record and deleted it - now everything is OK, I don't get WSOD (white screen) even after enbling custom theme:) Good luck!

Moreover - it appeared that the errors were on production site before update on 6.19 version, but I didn't see them cause didn't have the lines in index.php, so they come out just by the updating...

Thank you!

Adding the code to the settings.php file worked beautifully!

white screen of death due to no memory left

I had the white screen of death and php error messages did not show up, I looked in my server log and saw that a module I was using "theme devel" was using too much memory so I disabled that module

Place error reporting after bootstrap call

I hade a WSOD and I tried to enable error reporting following

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: ...

But that didn't make it because just after the bootstrap call, drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);, the error reporting was reset from the settings.php.
So you need either to temporarly edit settings.php and index.php or just place the code after the bootstrap code. That allowed me to find the bug and fix it

Mika Adrianarijaona
Web Developer

remote streamwrapper

Mine was caused by the module above. removed through ftp all fine.
Hope this helps

hello dear folks i also have

hello dear folks

i also have had this error! Belive it or not! i g ot it with a drupal commons 6,25

Well the funny thing is:

my administrative pages become white, but front page and other pages work normally.

i guess that this can be the weak weak server!?= What do you think!?
How can i test it!?

Guess that i have to little memory.!?

i love drupal for its power and its great options to extend. unleash the power of your web-project with drupal! The system with many thousands extensions - see all the great things get your module, plugin or whatever you need. All the best to your endeavo

I've been battling with a

I've been battling with a WSOD on update.php for a few days now - turns out oddly enough that it was the permissions on the update.php file - specifically that group had write permissions. I changed it to 644 and now it works.

In my case, a debug function

In my case, a debug function together with drupal_goto() was causing the WSOD.

I had a menu callback startin with dargs() (debug printout of arguments passed into the function) and ending with a drupal_goto() page redirect.

On the registry log in admin/reports/dblog, this error was being logged each time I tried the callback:
Cannot modify header information - headers already sent by (output started at /home/XXX/public_html/XXXXXX/sites/all/modules/devel/devel.module:1771) en /home/xxxx/public_html/xxxxxx/includes/common.inc en la línea 351.

Solved after commenting out the call to dargs().
Hope this may help someone.

Just disable this

Just disable this line:
"set_error_handler('_drupal_error_handler');" in bootstrap.inc

It took me 2 hours to find this.. No wounder I hate Drupal !!

White Screen due to URL Wrappers

It took me many hrs to find the solution:

1. First Comment Error Handler in bootstrap.inc:
set_error_handler('_drupal_error_handler');

2. Then I saw the errors all coming due to "public://" and "temporary://" wrappers. For this, go to includes/file.inc and hard-code the paths (This has to be done at many places in this file). For example:

if($_SERVER['REMOTE_ADDR']=='127.0.0.1'){
  $directory = str_replace("public://", DRUPAL_ROOT.'\\', $directory); #/Localhost, remove when live
  $directory = str_replace("temporary://", DRUPAL_ROOT.'\temp\\', $directory); #/Localhost, remove when live
  }else{
  $directory = str_replace("public://", DRUPAL_ROOT.'/', $directory); #/Localhost, remove when live
  $directory = str_replace("temporary://", DRUPAL_ROOT.'/temp/', $directory); #/Localhost, remove when live
  }

.

3. Run custom clean_cache.php, which has the following code:

<?php
ini_set
('max_execution_time', '2400');
define('DRUPAL_ROOT', getcwd());
include_once
'./includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
drupal_flush_all_caches();
?>

.

4. If you are moving site to a new server, you may also need to give recursively 777 permission to the folder:
"/sites/default/files/"

Stumped.

Added a dead simple menu item with an appropriately named callback. Went to rebuild menu using the Devel admin menu link: White screen has persisted since for user 1. Truncated cache tables. No PHP errors. Fortunately I had granted another role level permissions admin. Site is still up and running. Disabled all my custom modules including the one involved. Nothing. If I dump all cookies including SESSION, I can log user1 and white screen. Suggestions are appreciated. All modules currently enabled and other users can use the page I mentioned without a hitch. There's 256 MB PHP memory. This can be such a time suck.

For as in Adam all die, so in Christ all will be made alive

Thank you :)

Thank you :)

MySQL max_allowed_packet increased worked for us

We were experiencing WSOD on specific admin pages (e.g. editing content type or editing menu item) on a Drupal Commerce (Drupal 7) site.

Sequence of config changes we tried:

1. PHP memory_limit increased from 96M to 256M << no effect
2. PHP execution time increased from 30s to 60s << no effect
3. MySQL max_allowed_packet increased from 1MB to 16MB << bingo (maybe in combination with the preceding 2)

Whew! :)

WSOD

Hey girls and guys,
A friend and I are creating a Drupal 7 Website for a NGO. Now 2 days ago we got the WSOD and we have no clue why.
We looked through the forum, but not really successful. So can maybe someone help us?
Would send you an Account and a link to the website so you can have a look on it.
friendly and full of hope
Paul

Can you explain before facing WSOD

Can you explain before facing WSOD what you did on the website.

Solved

Thank you, we managed it to fix the problem. The cause for the WSOD was that only pages with neutral language setting were displayed. I don't know why it happened ... it changed from one day to the next.