Re: Error Checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 8, 2013 at 11:54 AM, Ethan Rosenberg, PhD
<erosenberg@xxxxxxxxxxxxxxxxxxxx> wrote:
> Dear List -
>
> 1] What function(s) do you use for error checking?
> 2] What are the settings for the parameter(s) in the functions?
> 3] Do you have different php.ini files for development and production?

This makes more sense answered in reverse:

3. Yes, I have different php.ini files for each of my environments:
development, testing, staging, and production. Generally speaking, my
development and test environments run on the same box, my local
workstation. Sometimes, test is run in a VM on my local workstation,
but is entirely self-contained. Staging and production are generally
on my VPS, under different directories and subdomains.

2. This is what I set in the appropriate php.ini for the environment:

For dev and test:

error_reporting = E_ALL | E_STRICT
display_errors = On
display_startup_errors = On
html_errors = On
log_errors = On

For staging and production:

error_reporting = E_ALL & ~E_STRICT
display_errors = Off
display_startup_errors = Off
html_errors = Off
log_errors = On


1. Functions I use for reporting errors:

error_log() to indicate internal application problems the code can detect.

a home-brewed debugging function that provides a single call for
insertion in code that will provide additional debugging information
based on environment and configuration.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux