White screen of death, site hangs after installing theme

General questions pertaining to how certain issues can be resolved
Forum rules
1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"

White screen of death, site hangs after installing theme

Postby gaia9 » 15 May 2012, 13:30

Hello,

I hope someone can help me here.

I have been getting the "white screen of death" for my entire site when installing Suffusion into my WP. The issue actually preceded the updates, which I hoped would resolve them. I hope I won't have to reinstall WP from scratch. :roll:

Below is the error log that tracks the problem; this error repeats indefinitely (I have obscured some of the path data per *****). The page hangs, saying "waiting for http://www.davidseacord.com

[Tue May 15 13:05:25 2012] [error] [client ********] PHP Warning: readdir() expects parameter 1 to be resource, boolean given in /var/home/************/davidseacord.com/www/wp-content/themes/suffusion/functions.php on line 1050, referer: http://www.davidseacord.com/wp-admin/up ... a6df221bdb


and later,
[Tue May 15 13:16:23 2012] [error] [client *********] PHP Warning: readdir() expects parameter 1 to be resource, boolean given in /var/home/***********/davidseacord.com/www/wp-content/themes/suffusion/functions.php on line 1050, referer: http://www.davidseacord.com/wp-admin/up ... a6df221bdb


This doesn't make any sense. Neither of the files mentioned have any of the references described.
wp-content/themes/suffusion/functions.php on line 1050,

while (false !== ($file = readdir($handle))) {
foreach($exts as $ext) { // for each extension check the extension
if (preg_match('/\.'.$ext.'$/i', $file, $test)) { // faster than ereg, case insensitive
$files[] = $file; // it's good
++$i;
}
}

And, in a search through wp-admin/update.php, I found no instance of the term a6df221bdb

I've been using Suffusion since '09, and it is working nicely on several other sites right now.

My current setup is:
Mac OS X 10.6.8
Firefox 12.0
WP 3.3.2 (all plugins disabled)
Suffusion 4.2.0

Thanks in advance,

Richard
gaia9
 
Posts: 2
Joined: 15 May 2012, 08:35

Re: White screen of death, site hangs after installing theme

Postby sayontan » 15 May 2012, 14:02

See this thread: viewtopic.php?f=4&t=7960&p=32954#p32954. The line numbers might be different from the ones in this thread, but the concept is the same.
Sayontan Sinha | http://mynethome.net/blog | http://www.aquoid.com/news
I don't do freelance work (for Suffusion or otherwise), so please don't contact me for quotes or offers.
sayontan
Site Admin
 
Posts: 10161
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas

Re: White screen of death, site hangs after installing theme

Postby gaia9 » 17 May 2012, 12:21

Hello Sayontan,

Thank you for such a prompt reply! Following your recommended thread, I first commented out the verbatim code snippet in suffusion-css-generator.php (which actually started at line 571), and that granted me access to the admin area, but the site itself was still WSOD.

Then moving on to functions.php, I could not find a verbatim code fragment. But I hunted for the snippet suffusion_get_rotating_image and found a single instance embedded in this fascinating chunk:
/**
* Based on the Image Rotator script by Matt Mullenweg > http://photomatt.net
* Inspired by Dan Benjamin > http://hiveware.com/imagerotator.php
* Latest version always at: http://photomatt.net/scripts/randomimage
*
* Make the folder the relative path to the images, like "../img" or "random/images/".
*
* Modifications by Sayontan Sinha, to dynamically pass the folder for images.
* This cannot exist as a standalone file, because it loads outside the context of WP, so variables such as folder names cannot be fetched by the file automatically.
*
* @param $folder
* @return string
*/
/*function suffusion_get_rotating_image($folder) {
// Space seperated list of extensions, you probably won't have to change this.
$exts = 'jpg jpeg png gif';

$files = array(); $i = -1; // Initialize some variables
// if ('' == $folder) $folder = './';
$content_folder = WP_CONTENT_DIR."/".$folder;

$handle = opendir($content_folder);
$exts = explode(' ', $exts);
while (false !== ($file = readdir($handle))) {
foreach($exts as $ext) { // for each extension check the extension
if (preg_match('/\.'.$ext.'$/i', $file, $test)) { // faster than ereg, case insensitive
$files[] = $file; // it's good
++$i;
}
}
}
closedir($handle); // We're not using it anymore
mt_srand((double)microtime()*1000000); // seed for PHP < 4.2
$rand = mt_rand(0, $i); // $i was incremented as we went along
return WP_CONTENT_URL."/".$folder."/".$files[$rand];
}
*/


I commented out the colored portion, and the site is now visible again.

I have a concern still, that some of my plugins may have trouble, as the site is meant to be a photo gallery. But I'll cross that bridge when I get to it.

Thank you so much for your intimate knowledge of the code!
gaia9
 
Posts: 2
Joined: 15 May 2012, 08:35


Return to Support Requests

Who is online

Users browsing this forum: KifyIrralay and 6 guests