Error reporting in PHP

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

Error reporting in PHP

Post by Ree »

Ok, here's the thing. I want to set the highest error reporting level in my php.ini. I thought "E_ALL & E_STRICT" should be used, but this makes errors not display at all. Maybe it should be "E_ALL | E_STRICT"?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

try it and find out. :)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Displaying errors and reporting errors are two separate things. The directive error_reporting handles which level of error to report up to. display_errors tells PHP whether to actually show errors or not. You can have the most strict level of error_reporting (E_STRICT for PHP 5, E_ALL for PHP 4) and if display_errors is 'Off', you won't see a single error report.
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

Post by Ree »

Everah... I know that. The question was not about that. And BTW, having only E_STRICT makes at least some errors not to be displayed compared to plain E_ALL.

When I use E_ALL | E_STRICT it seems to work. Just not sure if all E_STRICT warnings are going to be displayed in this case.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Sorry, I must have misunderstood your question. Have you read the manual on error reporting levels and what they do? And the part about using bitwise operators? These should be able to answer your question better than I could.
Post Reply