Connecting Tech Pros Worldwide Help | Site Map

Automatic notification of site errors

Newbie
 
Join Date: Aug 2009
Posts: 8
#1: Sep 12 '09
Hello

Is there an easy way to capture ALL(or most) site errors

I'm running a site which uses apache, php5 and mysql

I'm wanting to be automatically notified via email when the following occurs on the site:

- php errors
- mysql errors
- 404 errors
- any other unexpected site behavior

would the .htaccess file come into play or just some code pasted in a global php include?

Thanks
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,626
#2: Sep 13 '09

re: Automatic notification of site errors


Quote:

Originally Posted by firstposter View Post

I'm wanting to be automatically notified via email when the following occurs on the site:

- php errors
- mysql errors
- 404 errors
- any other unexpected site behavior

- you can catch every error below E_ERROR using set_error_handler()
- mysql errors have to be caught by your script
- you can make your own 404 page, which can notify you
- define ‘unexpected site behavior’ and i can tell you more

Quote:

Originally Posted by firstposter View Post

would the .htaccess file come into play or just some code pasted in a global php include?

you’ll need .htaccess for the 404 issue
Reply

Tags
apache, email, mysql, php, php5


Similar Apache Web Server bytes