SV: [PHP-DEV] PHP 4.0 Bug #3625: Level set by error_reporting() stays in effect after exit

From: Date: Sat, 26 Feb 2000 22:59:33 +0000
Subject: SV: [PHP-DEV] 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-16061@lists.php.net to get a copy of this message
> 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? Yes, that's exactly what I did. The result of the code above, reloaded a few times each minute, shifted between a few distinct values: 4, 1, 7, 63, 10. I checked: "find /home -name '*.php*' -exec grep -l error_reporting {} \;" (we have some 1200 users on the box). The scripts found *did* all set error_reporting to one of the values above. Depending on what script was accessed last/most, the result of error_reporting() would change. I also verified that these scripts were actually accessed, and they were. The scripts accessed more frequently appeared to set their value in a larger percentage of the httpd-children. To check further, I made a few scripts that set their own distinct error_reporting level. Reloading them a few times added these new values to the set of reported levels. The default in php.ini is 7. Every once in a while I would get result 7. As no script on the server explicitly sets this value, I interpreted it as fresh httpd-processes, still carrying the default value from php.ini. To overcome the problem, I have temporarily created a one-liner: <?php error_reporting(7) ?>, prepended to every script through the setting in php.ini. This works, but shouldn't be necessary of course. Tell me in what way I can help further! Best regards, /Johan Ekenberg

« previous php.dev (#16061) next »