Hello -

I have 2 new clients who have transferred their sites to my dedicated server (one is version 5.14 and the other is version 5.10). Last week, I got the bright idea to log into WHM and use easyapache to change my PHP configuration. I say this because I'm pretty sure this is when the WSOD began. I did save the original configuration profile, but when I try to revert back, the WSOD persist.

After changing my PHP configuration, the sites began experiencing WSOD when trying to add/node/custom-content-type as well as manually adding menu items.

Here's the funky part... when I clear my cache, I'm able to make it to the add/node/custom-content-type page. But when I hit submit, I get the WSOD and the content isn't saved. If I clear my cache before hitting submit, the content is successfully submitted.

This is the code snippet I found that totally clears my cache:

<?
echo "This page runs a script that clears the main cache.<br>";
db_query("DELETE FROM {cache} WHERE 1");
db_query("DELETE FROM {cache_filter} WHERE 1");
db_query("DELETE FROM {cache_menu} WHERE 1");
db_query("DELETE FROM {cache_page} WHERE 1");
echo "It's clear now.<br>";
?>

I've tried adding the following to my index.php to display errors, which didn't work for me:

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

I've also checked the apache logs for errors but can't seem to find any.

I have PHP's memory limit set at 256M.

I've also tried disabling all modules with no luck.

Here's my server setup:

Apache 2.0.63
PHP 5.2.11

Can anyone point me in the right direction???

Thanks in advance!

[Heine - Moved to Post installation]

Comments

criznach’s picture

Did you check your apache and php error logs?

johndp’s picture

I did and they were both empty.

chris.toler’s picture

Did you restart apache after reverting the php.ini file? The effects won't take place until it's reloaded.

johndp’s picture

Just gave that a shot, but I'm still getting the same results

chris.toler’s picture

Most of the time when this sort of thing happens (to me, at least), I've found that it's usually related to the max_filesize and post_max settings. For some reason, if you make those values extremely large (read: 1800MB or bigger, give or take), PHP stops working properly.

pobster’s picture

This is incorrect;

<?
echo "This page runs a script that clears the main cache.<br>";
db_query("DELETE FROM {cache} WHERE 1");
db_query("DELETE FROM {cache_filter} WHERE 1");
db_query("DELETE FROM {cache_menu} WHERE 1");
db_query("DELETE FROM {cache_page} WHERE 1");
echo "It's clear now.<br>";
?>

You need to start with <?php else you'll just get a syntax error (and a WSOD). Also the WHERE statement is completely irrelevant? WHERE TRUE? What's the point? TRUE will always be TRUE...

Why don't you just use the devel module - enable its block and you'll now have a quick click link to clearing your cache(s) completely.

Pobster

johndp’s picture

I hear you... I just copied and pasted this into a page as a quick way to clear my cache (which seems to work).

This isn't the cause of the white screen though. When I refresh this page to clear my cache, I'm actually able to make it to the node/add page without the whitescreen. If I fill out the node/add page and click submit, however, I get the white screen again. If I clear my cache again before submitting, the node is added successfully.

The main point is, that particular cache clearing code successfully clears my cache, but isn't the cause of the white screen.

lucyconnuk’s picture

Is this related to the following (problems adding nodes after upgrading to PHP 5.2.11)?

http://drupal.org/node/648868
http://drupal.org/node/117503#comment-2281634
http://drupal.org/node/621214

johndp’s picture

Our server had been upgraded to PHP 5.2.11 (which is when the problem started).

I reverted back to PHP 5.2.9 and the WSOD seem to have gone away.

Does anyone see any problems with running PHP 5.2.9?

Thanks again!

seanburlington’s picture

If there are genuinely no errors this is probably caused by trailing whitespace

i.e. if you have

?>[space]

The best thing is to remove the '?>' altogether - doing this is part of the drupal coding standard.

smk-ka’s picture

First, be careful where you add the error_reporting()/ini_set() lines. It is safer to add them to the end of settings.php, otherwise the settings might never take effect, since Drupal overwrites them shortly after.

Second, try using these two lines:

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

(Note 1, not TRUE).

-Stefan

johndp’s picture

Hi guys - thanks for all of your comments on this...

Lucy pointed me in the right direction which led to a fix for our particular WSOD problem.

Our server had been upgraded to PHP 5.2.11 when all of this began. After reverting to PHP 5.2.9, the WSOD no longer occur.

Thanks again!