A white screen (WSoD or "white screen of death") indicates that PHP is configured not to display errors, and has hit an error which it can't recover from. The result is an empty page.
Your next step is not to fix the error, but to first give yourself enough information to identify the source of the error. (Diagnose, then treat.)
Viewing errors in logfiles
The webserver can be configured to display errors to screen, but it also logs errors to files on disk. These files vary depending on your hosting environment, so you might consult your webhost's documentation to locate them. You might look for errors in some of these locations depending on webserver/php config -
/var/log/nginx/*err*log # NginX webserver error logs
/var/log/apache2/*err*log # Apache webserver & mod_php error logs
/var/log/*php*log # PHP-FPM & PHP-CGI error logs
/var/log/php5/*log # PHP-FPM & PHP-CGI error logs
/path/to/site/err*log # Some hosting environments
And a CiviCRM specific debug log file - location varies depending on hosting environment and CMS, refer to this wiki page for location -
path/to/site/path/to/civicrm/files/ConfigAndLog/CiviCRM*log
(The *
s above represent a wildcard, not an actual filename. Eg the last entry might be public_html/error_log on Bluehost.)
Once you've located these files, you can download them to view, or you can use tools like tail
or less +F
to follow the files. I prefer to follow logfiles because you can watch the error appear each time.
Displaying errors to screen
You may prefer to display errors to screen. This is probably disabled on your site because it's a security risk to some degree - an attacker can see more information when errors are visible, so the default configuration is often to restrict visibility to people with server access (via the logfiles above).
To enable error display, either:
Configure your PHP to display errors for your site via php.ini
/ .htaccess
(see How can I get PHP errors to display), OR
Add PHP code to enable error display (you can add it in civicrm.settings.php
or the top of the index.php
of your host CMS).
<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
Making sense of what you see
Once you've taken one of the above approaches, try reproducing the actions which led to a white screen. If all's gone well, you should see an error now (on screen, or in your terminal / SSH session).
This is where you can start debugging meaningfully. There's a good chance you're exhausting server resources (timeouts, memory exhaustion) or hitting some coding error, but once you have the relevant error message at hand you'll be much better equipped to track down the source of the problem affecting your site.
Further reading
Notes
If this is the first time you've looked, there may be other errors visible which don't relate to the problem at hand. You may still need to discern what the actual problem is ...
If you're not familiar with UNIX, this may seem like a lot of effort. It's a lot less effort than guessing your way through a problem though!