On Wed, Nov 26, 2008 at 2:21 PM, rick c <[EMAIL PROTECTED]> wrote:

>
>
>
> On Nov 26, 12:27 pm, "Chris Meller" <[EMAIL PROTECTED]> wrote:
> > Is there a particular reason you advocate changing the error_reporting
> > level, rather than changing display_errors? Personally, I think
> everything
> > should always be logged (error_reporting), but nothing should ever be
> > displayed (display_errors). This is in line with what the php.net docs
> > advise for production use...
> >
> >
>
> By the same token, php.net says that the default error level is E_ALL
> & ~ E_NOTICE and advises that one might want to turn E_NOTICE AND
> E_STRICT on during developement, not on production sites, so I'm
> having trouble understanding why error reporting should be set to a
> high level on a production site. People just want their sites to work.
> If the site is broken, they can give the developer an idea of the
> symptoms of the problem, and the developer would take it from there
> with debugging. Or maybe I'm naive.


If someone were to join IRC and report an intermittent, particularly weird
and obscure problem with no visible error that we'd never run into before,
wouldn't it be helpful if they looked in their logs and saw a bunch of
E_NOTICE and E_STRICT errors indicating that an index in $_SERVER was
undefined on their particular host? Providing more information is always
good.

Take, for instance, a problem I just fixed last night in Route301... my
/feed/ addresses weren't being redirected to /atom/1 anymore (due to
superglobal changes). I'd never have known this, had it not been for the
numerous notice's written to my logs.

E_STRICT errors are unlikely to actually cause a problem, but are also
equally unlikely to occur in a production environment. Why not log them?
There have been numerous things that I haven't been able to track down yet
because I can't figure out the situations in which they're happening... But
somewhere Habari is having a problem, and the only evidence I see of that is
in my logs. It's only logical that other users could learn of similar
problems (either from core or plugins) for the first time through their
logs.

Assume error reporting is set high, though, and error display is
> turned off. What happens if there is a NOTICE or STRICT error. Does
> the page just die without output,at the place where the error
> occurred, or is the error ignored while the script goes it's merry
> way? I really don't know.


Notices and strict errors by definition do not cause a page to die. The
possible error they're indicating (like an unset variable) could, however,
cause the page to die.

I think it would be best if our error handler were improved to log the error
and then display a friendly "something bad happened" page that tells the
user something is wrong but also doesn't potentially display any sensitive
information by outputting the actual error.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/habari-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to