[nycphp-talk] PhP error handler help -- totally confounded
Cliff Hirsch
cliff at pinestream.com
Mon Feb 4 15:58:24 EST 2008
The error handler on my production server has stopped working. I ran some
code to test it and am completely stuck. The trigger error line below works
just fine. But php isn¹t directing it¹s errors to the error handler.
blasasdfsdfgorg{; just stops dead. foobar(); which should also throw an
error since it doesn¹t exist, also doesn¹t get caught by the error handler.
Things were working until a few weeks ago and I can¹t think of any major
changes since then. PHP hasn¹t changed; no kernal updates, no code changes,
etc. Any ideas?
<?php
echo 'Testing error handler';
function error_handler($errNo, $errStr, $errFile, $errLine) {
echo 'Inside error handling function';
...
...
...
}
ini_set('error_reporting', E_ALL);
$old_handler = set_error_handler('error_handler');
echo 'Making errors now';
trigger_error("An error", E_USER_NOTICE);
foobar();
blasasdfsdfgorg{;
echo 'An error appeared above';
?>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20080204/e29f5cc7/attachment.html>
More information about the talk
mailing list