View Full Version : set_error_handler question

01-18-2004, 08:56 PM

Some years ago I made a academic project using PHP and Informix. To catch the messages from Informix and PHP I used the lines on the beggining of script

$old_error_handler = set_error_handler("myErrorHandler");

function myErrorHandler ($errno, $errstr, $errfile, $errline) {

and in the end of script I used


This worked. Now I'm using MySQL and PHP 4.3.4 on a project and these lines not work. I use this but I still see the warning messages on displayed on browser (if, for example, the mysql connection fails). How can I trap these messages? What is the technique?

Thank you


01-18-2004, 09:05 PM
Put error_reporting(0) at the top of your page, but I would advise against it personally.