RE: [PHP] double output from trigger_error from command line

From: Date: Tue, 17 Jul 2007 19:04:33 +0000
Subject: RE: [PHP] double output from trigger_error from command line
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-259034@lists.php.net to get a copy of this message
if i do a trigger_error() when running php scripts from the command line, each error is echoed twice. this is annoying. does anyone know how to make each error display only once? c:\>php -r "trigger_error(\"hello\");" PHP Notice: hello in Command line code on line 1 Notice: hello in Command line code on line 1
My error_reporting level was at 2039 and I did not see the double messages. But I think you need to manipulate the error_reporting level. Maybe something like: php -r "error_reporting(E_ALL ^ E_NOTICE); trigger_error(\"hello\", E_USER_ERROR);" "Show me every report except E_NOTICE, and then trigger an E_USER_ERROR which says 'hello'" Sorry, I didn't reply to the list the first time. _________________________________________________________________ http://liveearth.msn.com

« previous php.general (#259034) next »