White Screen of Death

Right now some situations (parse errors, undefined function call, no more memory) in PHP result in fatal error – which means the engine can not continue with the request beyond this point. From the user point of view, this often results in a blank page. I wonder if it would be possible to have standard recovery mechanism that would allow the PHP engine on fatal error to enter some kind of “recovery mode” when it would output some very basic page saying “ok, I have some problems here, but don’t panic and just tell my programmer to fix the code”. It won’t give much info probably but it would allow production sites display nice message to the users instead of the boring snowfield panorama it displays now (that is if the administrator was smart enough to set display_errors to off).

Maybe it should allow only fixed HTML, or maybe some kind of “request recovery” mode which would create some “recovery mode” sub-request when it would allow to do more – like send emails to webmaster. This may need some creative thinking but the main idea is to move away from the snowfield thing.

Advertisements