From: mike on
Does this look right?

Obviously you still want to know about production errors, so I'd like
to log them.

Development I want to see -everything- and I want it to display on the
page. The assumption is production won't have any notices as the code
should be clean and our higher priority are fixing errors. But that
one is easily editable if needed :)

Production:

display_errors = Off
display_startup_errors = Off
error_reporting = E_ALL & ~E_NOTICE
expose_php = Off
log_errors = On
error_log = syslog

Dev:

display_errors = On
display_startup_errors = On
error_reporting = E_ALL
expose_php = On
log_errors = On
error_log = syslog

Am I missing any?
From: Robert Cummings on
On Fri, 2008-08-01 at 17:30 -0700, mike wrote:
> Does this look right?
>
> Obviously you still want to know about production errors, so I'd like
> to log them.
>
> Development I want to see -everything- and I want it to display on the
> page. The assumption is production won't have any notices as the code
> should be clean and our higher priority are fixing errors. But that
> one is easily editable if needed :)
>
> Production:
>
> display_errors = Off
> display_startup_errors = Off
> error_reporting = E_ALL & ~E_NOTICE
> expose_php = Off
> log_errors = On
> error_log = syslog
>
> Dev:
>
> display_errors = On
> display_startup_errors = On
> error_reporting = E_ALL
> expose_php = On
> log_errors = On
> error_log = syslog
>
> Am I missing any?

Personally, and I know I'm not alone here... I keep E_NOTICE enabled
in production also.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

From: "Richard Heyes" on
> Personally, and I know I'm not alone here... I keep E_NOTICE enabled

Then you're both mad. Users really shouldn't see any error regardless,
so error reporting IMO should be off entirely. A blank screen that you
can blame on a variety of things is far preferable to users knowing
that your website is broken. In production I keep error_reporting set
to 0. There are a variety of things you could also do like log them to
a file or have them emailed to you so that you get notified when
errors occur.

--
Richard Heyes
http://www.phpguru.org
From: mike on
On 8/2/08, Richard Heyes <richard.heyes(a)gmail.com> wrote:
> > Personally, and I know I'm not alone here... I keep E_NOTICE enabled
>
> Then you're both mad. Users really shouldn't see any error regardless,
> so error reporting IMO should be off entirely. A blank screen that you
> can blame on a variety of things is far preferable to users knowing
> that your website is broken. In production I keep error_reporting set
> to 0. There are a variety of things you could also do like log them to
> a file or have them emailed to you so that you get notified when
> errors occur.

That's what we're saying.

He's saying he is LOGGING everything (error_reporting) not
display_errors - where it would output to the user :)

display_errors and maybe display_startup_errors are the key ones afaik
that expose any PHP related errors to the user. that's why I started
this thread to confirm my logic.
From: "Richard Heyes" on
>> Then you're both mad. Users really shouldn't see any error regardless,
>> so error reporting IMO should be off entirely. A blank screen that you
>> can blame on a variety of things is far preferable to users knowing
>> that your website is broken. In production I keep error_reporting set
>> to 0. There are a variety of things you could also do like log them to
>> a file or have them emailed to you so that you get notified when
>> errors occur.
>
> That's what we're saying.
>
> He's saying he is LOGGING everything (error_reporting) not
> display_errors - where it would output to the user :)

Oopsy. Missed that. Well as long as display errors is off then I guess
there's no problem with error_reporting set to E_ALL, and it would
even be preferable I guess.

--
Richard Heyes
http://www.phpguru.org