ID: 22839 Updated by: [EMAIL PROTECTED] Reported By: gk at proliberty dot com -Status: Open +Status: Bogus Bug Type: CGI related Operating System: linux RH 7.2 PHP Version: 4CVS-2003-03-24 (stable) New Comment:
Works fine when you have set it correctly in php.ini: # php -d log_errors=1 -d error_log=/dev/stderr -r "f();" 1>/dev/null Previous Comments: ------------------------------------------------------------------------ [2003-03-24 02:14:59] gk at proliberty dot com Error messages should go to /dev/stderr instead of /dev/stdout Example: redirect STDOUT to /dev/null; notice error message does not appear below: [EMAIL PROTECTED] php4-STABLE-200303210630]# sapi/cli/php -r "f();" 1>/dev/null [EMAIL PROTECTED] php4-STABLE-200303210630]# This is what you should see on /dev/stderr: [EMAIL PROTECTED] php4-STABLE-200303210630]# sapi/cli/php -r "f();" Fatal error: Call to undefined function: f() in Command line code on line 1 The problem is due to the default error handler; if you install a custom error handler function with set_error_handler() then you can work around the problem for errors except the following which CANNOT be handled with set_error_handler() function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR and E_COMPILE_WARNING. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22839&edit=1
