NYCPHP Meetup

NYPHP.org

[nycphp-talk] New PHundamentals Article - Error Handling

Mark Armendariz nyphp at enobrev.com
Mon Jul 19 15:10:50 EDT 2004


> I promise after this one I will shut up  :-)
> 
> Sending admin emails upon error catch - I don't consider this 
> a good idea in general, although of course it is widely done 
> and perhaps really only meant as an example. It is "open 
> loop" in that a server problem or mail sending problem 
> results in "no error reporting" - which simply hides the 
> errors. IOW, if e-massages are not displayed, and email 
> doesn't get sent, who knows there is a problem?

I would absolutely agree.   On a project I worked on late last year, we set
up an email for an error.  There was a var typo we missed that was caught by
the error handler.  The client made the site live before our final testing,
and 20 minutes later we got farked (as in fark.com).  15,000 error emails in
about 30 minutes, which the server wasn't too pleased about.

After that, I set log errors to 'on' and wrote a script to check the error
log every few minutes (via cron) and email if any 'new' errors arose (had an
flat file or db error cache which was cleared daily).

Mark




More information about the talk mailing list