error_reporting being set to 0
Moderator: General Moderators
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
error_reporting being set to 0
Somewhere, somehow in my code error_reporting is being set to 0 when it shouldn't be. I've done searches for any ini_sets and calls to error_reporting and I can't find a single place where it could possibly be set to 0. Does anybody have any idea what might set error_reporting to 0 as a side-effect or how I could find out the point at which error_reporting is changed?
You may tryin your php.ini
You'll get something like Warning: error_reporting() has been disabled for security reasons in file:line
phpinfo() shows a value != 0 for both global and local settings?
Code: Select all
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
disable_functions = error_reporting,ini_setYou'll get something like Warning: error_reporting() has been disabled for security reasons in file:line
phpinfo() shows a value != 0 for both global and local settings?
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Ahhh Ha!
Results in that file starting with error_reporting set to 0.
Which begs another question what is the best way of checking if a file can be included or not?
Code: Select all
if (!@include $fileToLoad) {Which begs another question what is the best way of checking if a file can be included or not?
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
file_exists(). I think there was a post around here at one point that brought up the fact that if you use error suppression on an include it acts as a global error suppressor for the entire file (or something to that effect).
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA