Re: Error Checking

From: Date: Wed, 09 Jan 2013 03:10:08 +0000
Subject: Re: Error Checking
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-48638@lists.php.net to get a copy of this message
On Tue, Jan 8, 2013 at 11:54 AM, Ethan Rosenberg, PhD <erosenberg@hygeiabiomedical.com> 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.

« previous php.db (#48638) next »