
September 29th, 2002, 11:10 PM
|
|
Guru-in-training
|
|
Join Date: May 2002
Location: Not where I want to be...yet!
Posts: 38
Time spent in forums: < 1 sec
Reputation Power: 7
|
|
|
Error reporting in PHP - (BFO)
BFO=Blinding Flash of the Obvious!
I've been mucking around with a number of third party scripts lately, and have found that with the majority, on my test machine (which is totally under my control) the scripts behave very well, while on my ISP's machine, it invariably spits out Notice-type errors where variables are used before they're declared, etc.
On my test machine, I simply modified the php.ini file so that the error_reporting variable was set to E_ALL &~E_NOTICE. On my ISP's machine, no such luck.
On reading the F(riendly) manual, I discovered that you could set the error_reporting variable on a per page basis too. Magic!!!
So, for others who like me have perhaps discarded scripts because they were "full of bugs", sometimes adding the function call error_reporting(247) to common.php (or a file that's included globally) can help hide the notices while still alerting you to other more serious errors.
Hope this saves someone time and frustration!
|