ExpressionEngine White Screen of Death
When $debug = 1 doesn't come to the rescue.
We all know that by editing the index.php or admin.php files and setting $debug = 1
should display errors.
Sometimes, this doesn't work and you're still staring at a "white screen of death".
In these cases, the code shown below, should work.
Paste this into the top of index.php or admin.php (depending on where you're getting the white screen) and (in most cases) you'll finally see what's causing the problem.
ini_set('html_errors', 0);
error_reporting(-1);
if(@is_array($error = @error_get_last())) {
return(@call_user_func_array('ErrorHandler', $error));
};
return(TRUE);
};
$_ERRORS = Array(
0x0001 => 'E_ERROR',
0x0002 => 'E_WARNING',
0x0004 => 'E_PARSE',
0x0008 => 'E_NOTICE',
0x0010 => 'E_CORE_ERROR',
0x0020 => 'E_CORE_WARNING',
0x0040 => 'E_COMPILE_ERROR',
0x0080 => 'E_COMPILE_WARNING',
0x0100 => 'E_USER_ERROR',
0x0200 => 'E_USER_WARNING',
0x0400 => 'E_USER_NOTICE',
0x0800 => 'E_STRICT',
0x1000 => 'E_RECOVERABLE_ERROR',
0x2000 => 'E_DEPRECATED',
0x4000 => 'E_USER_DEPRECATED'
);
$name = 'E_UNKNOWN';
};
};
Remember - remove this code when you're done. Don't leave it lying around on a production system!
The above error handler code was copied from another post somewhere a few years ago and we can't remember where. If the original author gets in touch with us we'd be more than happy to give them credit here as it's got us out of a tricky situation more than once.
Expression Engine Tips and Tricks
ExpressionEngine is a Content Management system which is highly flexible. Why not give it a try?
- ExpressionEngine White Screen of Death
- Field Types Trick when Upgrading ExpressionEngine from 2.x to 6.x
- Getting Captcha Working
- ExpressionEngine upgrade 2.7.1 to 2.9.0
- Transcribe tips
- Using SafeCracker with AJAX and Solspace Calendar
- Creating Navigation Using Structure
- CP Loses Its Styling
- Thumbnails aren't Created in EE on a Windows Installation
- Can't Get a Template to Load from File
- How to Remove index.php on IIS
- File Cannot Be Written To Disk
- Error 500.0 Internal Server Error
- Unable to Load Site Preferences
- Your Config File Does Not Appear to be Formatted Correctly