Re: error_reporting(0)..

From: Date: Wed, 28 Jan 2004 03:19:22 +0000
Subject: Re: error_reporting(0)..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-175998@lists.php.net to get a copy of this message
Parse errors are scanned for and displayed before the PHP parser even starts trying to execute the code itself. I doubt you can usefully intercept them because anything you may have written into the file to handle them will never be run. ----- Original Message ----- From: "Robert Restad" <robertrestad@yahoo.no> To: <php-general@lists.php.net> Sent: Tuesday, January 27, 2004 10:03 PM Subject: [PHP] error_reporting(0).. > I am attempting to write my own little error-logging function... > however, for some reason, whatever I do I can not seem to override the > error display setting on the server. > > Starting at the most simple thing, you should think that when you write > . > > <? > Error_reporting(0); > ?> > > . should pretty much stop every error message eventually generated on > the production server. But it wont. The only way I can shut off the > error messages, is to set "display_errors = Off" in PHP.INI . > > Now, this means I can track i.e. NOTICE errors, but parse-errors will > show nonetheless. My wish is that whatever error the system outputs, I > would like to be able to deal with them my very own custom way. > > Anybody got a good idea of how I can successfully switch off these pesky > error messages on runtime level and then trap them all? > > Rob. >

« previous php.general (#175998) next »