Re: error reporting



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.

.



Relevant Pages

  • Re: [PHP] Help with IF ELSE
    ... This can prevent all error message to be shown. ... I turned on error reporting as you suggested. ... is there any other way to do a redirect in PHP? ...
    (php.general)
  • Re: [PHP] Include fails when "./" is in front of file name
    ... For example, if you're missing a semi-colon and you have error reporting turned on, all you get is a blank page - no other info. So, odds are is that he isn't receiving an error message. ...
    (php.general)
  • Re: Information about notices
    ... "Eamon Reyn" wrote in message ... > PHP, JavaScript MySQL, Apache, REST and a couple of other technologies. ... > of this info if someone knows some good web links about this sort of stuff ... I keep error reporting set to E_ALL while developing and shut ...
    (alt.php)
  • Re: Phpnuke module.php vulnerability and php error_reporting issue
    ... This is a known vulnerability for quite some time now. ... there are many Cross site scripting issue on Phpnuke modules ... > and other web application using PHP. ... > This crafted url cause the module.php script to make an PHP error reporting ...
    (Bugtraq)
  • Re: [PHP] Will not report errors what can I do
    ... I have all kinds of error reporting ... and true can usually be used interchangeably in most programming languages ... But it's clearer for the programmer to use true and false ... Application and Templating Framework for PHP ...
    (php.general)