Can i get email notification each time error_log added/increased?

Each time our site got error messages, is stored in a home/username/public_html/error_log file, in ftp right?

i wonder can i get notification to email each time new error message added/increased? the response or notification is the most important, so can fixing the problem asap, and since some of us not to often accessing+checking the ftp

bm,

Good thought … but the log is a special entity.

I’ve made a quick check at Apache.org and they don’t appear to have a mechanism for e-mailing error reports. That then falls upon the webmaster to use a custom error handler to write to the logs as well as e-mailing you. Don’t worry, SitePoint’s PHP Anthology book has a section on custom error handlers.

Regards,

DK

You will need to investigate a log processing / log handling system - maybe even a simple script you write yourself that tail’s the file and emails out any changes from it.

Depending on the type of error in the log, you could potentially catch them in your code and email from within the sites code?

On second thought, the PHP error handler will only help PHP errors (which should have been thoroughly tested before putting online). What type of errors are you looking to be notified about? Apache errors? PHP errors? MySQL errors? I think that a cron script looking at the length of your error log (for changes) may be more realistic for you.

Regards,

DK