Bug #18498: error_reporting doesn't work, but ini_set('error_reporting') does
| From: | paul dot php at burney dot ws | Date: | Tue, 23 Jul 2002 16:12:23 +0000 |
| Subject: | Bug #18498: error_reporting doesn't work, but ini_set('error_reporting') does | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-14902@lists.php.net to get a copy of this message | ||
From: paul.php@burney.ws
Operating system: RedHat 7.1
PHP version: 4.2.2
PHP Bug Type: Scripting Engine problem
Bug description: error_reporting doesn't work, but ini_set('error_reporting') does
It would appear that the error_reporting function in PHP 4.2.2 doesn't work
correctly. (Apache 1.3.26)
Here is a sample script. In php.ini, the error level is set to E_ALL ^
E_NOTICE.
<?php
error_reporting(E_ALL);
phpinfo();
?>
In the resulting web page, it shows both the local value and the master
value of error_reporting as 2039, instead of 2047 for the local value.
The following does work correctly:
<?php
ini_set('error_reporting', E_ALL);
phpinfo();
?>
That shows 2047 for the local value and 2039 for the master value.
PHP configuration:
'./configure' '--prefix=/usr/local/php-4.2.2' '--with-mysql=/usr'
'--with-pgsql=/usr' '--enable-trans-sid'
'--with-config-file-path=/usr/local/php' '--with-zlib' '--enable-yp'
'--enable-ftp' '--enable-magic-quotes' '--enable-force-cgi-redirect'
'--enable-discard-path' '--with-kerberos'
--
Edit bug report at http://bugs.php.net/?id=18498&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18498&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18498&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18498&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18498&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18498&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18498&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18498&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18498&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18498&r=globals