I really want PHP to email me *any time that a visitor is served an error message*. It's useless for my visitors to see an error message... they cannot fix my scripts... only I can do that... but I can't if I don't know they are there! So... is it possible? Thanks in advance for helping
You should not display errors to visitors, the error display is mainly for development purposes. http://www.google.com/search?q=hide+php+errors You want to receive emails...Technically you can do it but I think your inbox will be filled in no time, you'd rather check your error logs from times to time for weird errors.
If you are on cPanel you can easily check the Error Log. Error Log shows the last 300 error messages in reverse order with the time, IP address of the visitor and the URL that caused the error. It can be useful for de-bugging scripts you are testing, seeing if you have any missing files or broken links and for seeing if people are trying to cause mischief on your account!
Yes, it is. You will need to look into using your own custom error handler which is not as hard as it might sound. http://uk3.php.net/manual/en/function.set-error-handler.php Basically, you can use this to filter errors on their error level or other such criteria and in your customer handler have it send an email to you. This will save you trawling through your logs! This may also be of interest to you, if you are not familiar with creating your own handler; http://www.w3schools.com/php/php_error.asp
Thanks a lot for the help I'll look into which is easier: building my own error handling like you suggested, or making a cron job to buzz me any time the errorlog changes.
For me, I'd like to know IMMEDIATELY when there are errors! Nothing's worse than just checking out your own website for fun before you go to bed, and seeing a glaring error! And then wondering how long that's been going on for!