ID:          41418
 Updated by:  [EMAIL PROTECTED]
 Reported By: public at syranide dot com
-Status:      Open
+Status:      Bogus
 Bug Type:    Feature/Change Request
 PHP Version: 5.2.2
 New Comment:

log_errors = On
error_log = <whatever you want>


Previous Comments:
------------------------------------------------------------------------

[2007-05-17 17:05:30] public at syranide dot com

Description:
------------
Something I've been longing to see is a way to catch fatal errors so
that PHP doesn't print out errors to the clients or worse, nothing at
all. Obviously this isn't possible as the engine might be in an unstable
state and it would be unsafe to continue.

But I figure if the internals of PHP can handle it, would it not be
possible to upon fatal errors run a pre-defined script filename
(settable via iniset/putenv as well) using a new instance of the engine
with the error available (perhaps the backtrace as well) in $_SERVER or
wherever? So that you could apply your own error logging and output.

So instead of:
runscript IF fatalerror THEN printfatal END
You would get something like:
runscript IF fatalerror THEN runhandler IF fatalerror THEN printfatal
END END

This would be a blessing for both custom debugging functionality,
giving clients useful errors and being able to log these actions using
custom utilities (most people don't have access or log php errors in the
http-log). As in fact, the common fatal errors are that you have called
a non-existant function, worked on a bad object or put in a bad
character and not the engine going rogue.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41418&edit=1

Reply via email to