tags:

views:

46

answers:

2

Like one of those "Error 404" pages, I wish to show the visitor an error page with a fat sorry message in the case a script crashes. I use register_shutdown_function() to register a callback function. But the problem is, probably, that headers were already sent. However, maybe you know a good possibility to do that?

+1  A: 

Maybe set_error_handler is what you are looking for?

http://php.net/manual/en/function.set-error-handler.php

kdevine
+1  A: 

If I understand your question correctly, this blog post may be helpful: http://www.eggplant.ws/blog/php/mayday-php-going-down/

The author shows how to catch fatal errors and deal with them gracefully.

bradym