Bug #9904 Updated: error_reporting setting in apache conf not respected in pages
| From: | sniper@php.net | Date: | Sun, 21 Oct 2001 01:54:11 +0000 |
| Subject: | Bug #9904 Updated: error_reporting setting in apache conf not respected in pages | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-68532@lists.php.net to get a copy of this message | ||
ID: 9904
Updated by: sniper
Reported By: sklar@tvgrid.com
Old Status: Open
Status: Bogus
Bug Type: PHP options/info functions
Operating System: Linux host 2.2.12-20 #1 Mon Sep
PHP Version: 4.0 Latest CVS (20/03/2001)
New Comment:
RTFM:
http://www.php.net/manual/en/configuration.php
(the error_reporting in apache confs only accepts numbers as value)
Previous Comments:
------------------------------------------------------------------------
[2001-03-21 12:47:28] sklar@tvgrid.com
The error_reporting setting I put in my apache conf doesn't work in my pages, but if I call
error_reporting() with the same value in the page, it works. I am using build php4-200103160645. I
am attempting to follow the instructions at http://www.php.net/manual/cs/x49925.php. PHP is
configured suchly:
./configure '--with-apache=../apache_1.3.19+mod_ssl'
'--with-mysql=/usr/local/mysql-3.23.32-pc-linux-gnu-i686' '--with-xml'
'--enable-track-vars' '--without-ldap' '--without-imap'
'--without-gd'
The relevant section of my httpd.conf:
php_value track_vars 1
php_value track_errors 1
php_value display_errors 0
php_value log_errors 1
php_value error_reporting "E_ALL & ~ ( E_NOTICE )"
In a page, <?php echo ini_get('error_reporting');?> reports back
E_ALL & ~ ( E_NOTICE )
Calling phpinfo() also reports the same Local Value for error_reporting
However, If I have a page that looks like this:
<?php
parse error
?>
Nothing appears in the error log.
<?php
error_reporting(E_ALL);
parse error
?>
Also puts nothing in the error log, I guess because it hits the parse error before the
error_reporting() function call gets executed.
However, a page like this:
<?php
imaginary_function();
?>
puts nothing in the error log, while
<?php
error_reporting(E_ALL & ~ ( E_NOTICE ));
imaginary_function();
?>
correctly puts a message in the error log ("PHP Fatal Error: Call to undefined function:
imaginary_function() .....")
My php.ini only has entries for include_path, max_execution_time, and track_errors, nothing about
error_reporting.
The same behavior happens if the error_reporting setting in my httpd.conf is just E_ALL.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=9904&edit=1