|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51652 Unable to turn off E_NOTICE errors
Submitted: 2010-04-24 06:50 UTC Modified: 2010-04-25 14:32 UTC
From: knkk at fullhyd dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.3.2 OS: Linux
Private report: No CVE-ID: None
 [2010-04-24 06:50 UTC] knkk at fullhyd dot com
I recently migrated to PHP 5.3.2, and realized that I am unable to turn off notice errors in my site now. I went to php.ini, and in these lines:

; Common Values:
;   E_ALL & ~E_NOTICE  (Show all errors, except for notices and coding standards warnings.)
;   E_ALL & ~E_NOTICE | E_STRICT  (Show all errors, except for notices)
;   E_ALL | E_STRICT  (Show all errors, warnings and notices including coding standards.)
; Default Value: E_ALL & ~E_NOTICE
; Development Value: E_ALL | E_STRICT
; Production Value: E_ALL & ~E_DEPRECATED
error_reporting = E_ALL & ~E_NOTICE

...I've tried setting every combination (and I restart apache each time), but I am unable to get rid of notices.

The only way I'm able to get rid of notice errors is by setting :

display_errors = Off

That is, of course, not something I can do since I need to see errors to fix them, and I would like to see errors on the webpage that I am coding rather than log them somewhere.

I am not using the error_reporting function in my code, so there is no question of over-writing. Plus, I am editing the proper php.ini file.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-25 14:23 UTC] knkk at fullhyd dot com
Correction - there is no bug. My bad.

I figured what was going wrong. I set error_reporting in my code, which was overwriting the php.ini error_reporting.

Now the reason that that same stuff was working until I upgraded to PHP 5.3.2 was this - in my code, I set the error_reporting command:

I should've set it as:
[CODE]error_reporting(E_ALL ^ E_NOTICE);[/CODE]
I'm guessing the meaning of 6143 is different in PHP 5.3.2 compared to in 4.1 (or whatever my earlier version was).
 [2010-04-25 14:32 UTC]
-Status: Open +Status: Bogus
 [2010-04-25 14:32 UTC]
Not a bug > bogus
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue May 11 11:01:23 2021 UTC