This isn't specific to ZF, but general to any PHP application.
Firstly, you want to turn of display_errors in your productions environment. As you say, seeing them is not nice. You can instead log them to a log file on the server (PHP: Error Handling - Manual).
Depending on how much control you have over the server, you could then set up a cron (or log rotation rule) to check the log and email it to you if it isn't empty.
Another option is to use a custom error handler (PHP: set_error_handler - Manual), you can then email the error details to yourself as they happen. But your custom handler does have to correctly deal with the different error levels.
Which is the best option would depend on factors such as server access and how many errors you are getting; if you're getting 100/minute you probably don't want to get a separate email for every one.


LinkBack URL
About LinkBacks



Reply With Quote

