|
Posted by Chung Leong on 11/18/79 11:42
Paul Furman wrote:
> What is the proper way to turn off error reporting? I'm on a shared
> server so...
That depends on what you mean by turning off error reporting. Setting
display_errors to 0 means simply that PHP won't display error message.
Depending on the error reporting level, the error could still be
recorded in the error log (if one is set up). Doing a
error_reporting(0) means errors won't get into the error log either.
Another difference is that error_reporting(0) doesn't stop CORE
error/warning messages from displaying. They're very rare though.
> "Note: Although display_errors may be set at runtime (with ini_set ()),
> it won't have any affect if the script has fatal errors. This is because
> the desired runtime action does not get executed."
Yeah, the phraseology is kinda weird. What they mean is if you have a
syntax error in your script, then error_reporting(0) never gets called
as the operation has died (and emitted the error message) at the
parsing stage. They don't say that exactly because in PHP 5, some
language errors in some circumstances can cause early termination too.
Navigation:
[Reply to this message]
|