|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9904 error_reporting setting in apache conf not respected in pages
Submitted: 2001-03-21 12:47 UTC Modified: 2001-10-20 21:54 UTC
From: sklar at tvgrid dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.0 Latest CVS (20/03/2001) OS: Linux host 2.2.12-20 #1 Mon Sep
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: sklar at tvgrid dot com
New email:
PHP Version: OS:


 [2001-03-21 12:47 UTC] sklar at tvgrid dot 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 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:


parse error 


Nothing appears in the error log.



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:




puts nothing in the error log, while


error_reporting(E_ALL & ~ ( E_NOTICE ));


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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-20 21:54 UTC]

(the error_reporting in apache confs only accepts numbers as value)

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Dec 06 02:01:27 2023 UTC