I would like to execute a shell or PHP script everytime my PHP throw an Error.

The only way I see actualy is to watch in real time all the .error.log file in /var/log/apache2, but it would require a deamon or longrunning script ? And I don't know how to do that.

In my dreams, I should be able to give command line to Apache / PHP, launched at EVERY error on every virtualhost.

Just to let you know, I want to do this on a developper laptop, not on production servers. I want to throw a notify-send on my Ubuntu :-) How cool is that?

link|improve this question
feedback

1 Answer

Use set_error_handler to write custom error handler to call script and auto prepend that script with auto_prepend_file...
Also, idea is stupid ... On dev enviroments debugger should be used to inspect unhandled errors.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown