how to
Drupal White Screen of Death
Another blank screen troubleshooting tip per torgosPizza on ubercart.org:
"... to troubleshoot your white screen problem, put this into the top of your index.php:
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
That'll show you any fatal errors (which Drupal chokes on). It's helped me tons."
I think this is a wonderful tip, so I am sharing it here.
Sometimes Stuff is Stuff
So I am upgrading a 4.7.x site to 5.2 and I managed to get everything working great till I tried to create the custom theme. I got the blank Drupal screen of death and the following in the httpd error log as soon as I turned up the new theme ...
Call to undefined function module_exist() in /Library/WebServer/Documents/rms/includes/common.inc(1342) : eval()'d code on line 2
So I go crazy ... I pour over the code in the common.inc, increase the php memory, created the new theme over and over again, and the more I messed with it the worse it got till even the admin area was the white screen of death ... WHOA!
So instead of searching for solutions on drupal.org, I did what I should have done in the beginning... searched for the problem. And lo and behold, this little gem pops up.
I think at least one of your blocks is using this function. Try searching boxes and blocks tables in your database for module_exist. If you can find then replace it with module_exists.
OMG, I hadn't thought to take the error message literally. I thought it was pointing to some esoteric mystery within php. When all along it was simply saying that this function is not defined anywhere.
Seems the function name had changed from version 4.7 to 5.2. And it had been hard coded in to several blocks by a module that was not upgraded to 5.x ... so of course the specialized code missed the change. Wow!
Too funny ... so remember ... sometimes stuff is just stuff!
And ... search drupal.org for the problem first, not your supposed solution.
File Not Found!
If you ever get File Not Found just after copying a site to a web directory, it is most likely caused by your not copying the .htaccess file. I copied a site to my sandbox and since I could see the home page, I assumed evrything was hunky-dory. That is until I clicked on a link, then whoa! I checked file listing in terminal and yup, the htaccess file was missing.
If you have to use Finder to copy a site and you cannot grab the entire folder, make a note to yourself to remember the .htaccess file.
... just saying ...
Database Not Recognized
On new installs when setting up sandbox sites, drupal sometimes has problems finding the correct database.
In phpMyAdmin, make sure you have root set up with all privleges for all databases on localhost. Then use root as the user in your settings.php file.
Once I changed the user to root, with the appropriate password and database name, everything worked fine.
