Re: PHP 4.0 Bug #3625: Level set by error_reporting() stays in effect after exit

From: Date: Sat, 26 Feb 2000 21:51:33 +0000
Subject: Re: PHP 4.0 Bug #3625: Level set by error_reporting() stays in effect after exit
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-16057@lists.php.net to get a copy of this message
At 23:22 25/02/2000 , johan@ekenberg.nu wrote:
From:             johan@ekenberg.nu
Operating system: Linux 2.2.14 SMP
PHP version:      4.0 Beta 4 Patch Level 1
PHP Bug Type:     Misbehaving function
Bug description: Level set by error_reporting() stays in effect after exit Using PHP as an Apache module, it seems that Apache retains the value set by error_reporting() between requests. This means that whatever error reporting level is set within a script, it's inherited by all subsequent php scripts until changed by another error_reporting() call. It looks like every httpd child retains it's own value: I spent a while checking the current level, and it kept changing among the values set by different scripts on the server. I guess I hit different httpd processes at different times. I definitely assume that every php script is supposed to have the default error_reporting level set in php.ini, if not explicitly defining its' own level!
This sounds very weird, as this mechanism is known to work for quite a while (it's not unique to error_reporting, all of the INI directives use the same mechanism). error_reporting is based on the value in your php.ini, but also on the values in .htaccess and error_reporting(). Can you bring your server to a situation in which a simple, one line script: <? print error_reporting(); ?> would print out different values if you simply reload the page? Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/

« previous php.dev (#16057) next »