Hi,

I was playing around with error handlers, and tried this:

<?php

error_reporting(E_ALL ^ E_NOTICE);

function ErrorHandler($_ErrorNumber_, $_ErrorString_, $_ErrorFile_,
$_ErrorLine_, $_ErrorContext_)
{
    mail("[EMAIL PROTECTED]", "Error", "Blah blah blah");
}

set_error_handler("ErrorHandler");

...

?>

Which worked just fine.  A little too good, in fact.

I got over 1,200 emails in a matter of minutes (high traffic site).

I was finally able to get it to stop by re-declaring the function
without the mail() call, but how do I restore PHP's default error
handler?

I haven't had any success with restore_error_handler();

Thanks,
Brian


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to