Every now and then my databases will crash and I have to restart them. While they are down, my phpBB2 forum of course becomes unusable. When one tries to go to it they get error messages. I want to set it up so that whenever phpBB2 encounters one of these major errors, it sends me an email. My forum could be down for hours and if I don't happen to check it out and nobody else happens to email me, I won't know. Something that could be fixed in minutes won't be fixed for hours simply because I don't know about it. It seems like it would be a simple modification to the phpBB2 code to have it send an email to me when one of these database connection errors is encountered. Can anyone post a quick guide for me to make that change? Thanks! Scott
I wrote an article about this a while back http://www.jaygilford.com/php/gracefully-handling-errors-in-php-using-advanced-techniques/ Go down to the set_error_handler part, and instead of inserting into the database, use the mail function to send yourself a message. you could use a regex to match certain error messages you want to report to yourself.