...

View Full Version : set_error_handler question



sgalmeida
01-18-2004, 08:56 PM
Greetings

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

restore_error_handler();


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

SÚrgio

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum