Re: [PHP] Re: Exposing PHP/errors on production vs. dev
At 1:04 AM -0400 8/3/08, Daniel Brown wrote: On Sun, Aug 3, 2008 at 12:22 AM, Chacha C [EMAIL PROTECTED] wrote: Somehow .. I feel this isn't PHP Related. Boy, nothing gets by you, eh? Welcome to the list, new meat. Hey, he said he feels that it wasn't PHP Related. That's not like knowing it wasn't. Welcome, new dude. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Exposing PHP/errors on production vs. dev
Here' the snippet I use on all my code files. Default is create and add to error log file on the current dir. I generally echo $error_reporting to remind myself that the error reporting is active. if(true) // TRUE for debug only { ini_set(display_errors, on); //use off if users will see them error_reporting(E_ALL); $error_reporting = 'span style=color:redError display and logging on/span '; } 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? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Exposing PHP/errors on production vs. dev
On Sat, Aug 2, 2008 at 12:52 PM, Al [EMAIL PROTECTED] wrote: Here' the snippet I use on all my code files. Default is create and add to error log file on the current dir. I generally echo $error_reporting to remind myself that the error reporting is active. if(true) // TRUE for debug only { ini_set(display_errors, on); //use off if users will see them error_reporting(E_ALL); $error_reporting = 'span style=color:redError display and logging on/span '; } Quit top-posting, Al, or we'll feed you to the sheep. ;-P I do a similar thing, but with on-the-fly error display for debugging. Using sessions, only those with a developer flag see any errors. The rest are handled in logs (and yes, using E_ALL). One of my systems uses ~E_CUMMINGS though, because it reports things too violently. -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Exposing PHP/errors on production vs. dev
On Sat, 2008-08-02 at 13:34 -0400, Daniel Brown wrote: On Sat, Aug 2, 2008 at 12:52 PM, Al [EMAIL PROTECTED] wrote: Here' the snippet I use on all my code files. Default is create and add to error log file on the current dir. I generally echo $error_reporting to remind myself that the error reporting is active. if(true) // TRUE for debug only { ini_set(display_errors, on); //use off if users will see them error_reporting(E_ALL); $error_reporting = 'span style=color:redError display and logging on/span '; } Quit top-posting, Al, or we'll feed you to the sheep. ;-P I do a similar thing, but with on-the-fly error display for debugging. Using sessions, only those with a developer flag see any errors. The rest are handled in logs (and yes, using E_ALL). One of my systems uses ~E_CUMMINGS though, because it reports things too violently. Hmmpf! -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Exposing PHP/errors on production vs. dev
On Sat, Aug 2, 2008 at 1:40 PM, Robert Cummings [EMAIL PROTECTED] wrote: Hmmpf! Oh, God, it's tasted human blood! Cut the crap, Rob. Don't even try to act innocent in front of the list, denying that you threw that chair through my window and punched me in the throat all because I forgot a semicolon. I told you I was sorry! -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Exposing PHP/errors on production vs. dev
On Sat, 2008-08-02 at 13:53 -0400, Daniel Brown wrote: On Sat, Aug 2, 2008 at 1:40 PM, Robert Cummings [EMAIL PROTECTED] wrote: Hmmpf! Oh, God, it's tasted human blood! Cut the crap, Rob. Don't even try to act innocent in front of the list, denying that you threw that chair through my window and punched me in the throat all because I forgot a semicolon. I told you I was sorry! Sorry, I hired a profession for the chair throwing-- my bulldog Steve Ballmer! Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Exposing PHP/errors on production vs. dev
On Sat, Aug 2, 2008 at 1:58 PM, Robert Cummings [EMAIL PROTECTED] wrote: Sorry, I hired a profession for the chair throwing-- my bulldog Steve Ballmer! More wasteful spending by the Canadian. You know that he's just going to wind up finding a way to introduce new bugs into the act of domestic violence, right? Like fear that emits an unpleasant odor or bruises that cause herpes. -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Exposing PHP/errors on production vs. dev
On 8/2/08, Al [EMAIL PROTECTED] wrote: Here' the snippet I use on all my code files. Default is create and add to error log file on the current dir. The problem is if the script is fubar, it won't read the error_log ini override... Open question for all: Even though I have error_reporting set to on, and display_errors set to on, sometimes errors occur and it just shows a blank page. Why is that? I used to always get -some- output, now I get nothing. It's quite annoying. I am excited for PHP 5.3's ini settings features - then I can create a PHP error log per each docroot (manually, for now), or I suppose if I can remember the syntax in php-fpm I can already do that. Problem is then I just need to configure things to rotate/reset those logs every so often. (heads up: feature request, error_log_max_filesize!) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Exposing PHP/errors on production vs. dev
On Sat, 2008-08-02 at 14:01 -0400, Daniel Brown wrote: On Sat, Aug 2, 2008 at 1:58 PM, Robert Cummings [EMAIL PROTECTED] wrote: Sorry, I hired a profession for the chair throwing-- my bulldog Steve Ballmer! More wasteful spending by the Canadian. You know that he's just going to wind up finding a way to introduce new bugs into the act of domestic violence, right? Like fear that emits an unpleasant odor or bruises that cause herpes. Given the goal was to enact violence... I think fear and herpes would count as features! With respect to wasteful spending... I think you're forgetting that the US dollar is on target for devaluation similar to that of Zimbabwean currency. :B Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Exposing PHP/errors on production vs. dev
Somehow .. I feel this isn't PHP Related. On Sat, Aug 2, 2008 at 11:08 AM, Robert Cummings [EMAIL PROTECTED]wrote: On Sat, 2008-08-02 at 14:01 -0400, Daniel Brown wrote: On Sat, Aug 2, 2008 at 1:58 PM, Robert Cummings [EMAIL PROTECTED] wrote: Sorry, I hired a profession for the chair throwing-- my bulldog Steve Ballmer! More wasteful spending by the Canadian. You know that he's just going to wind up finding a way to introduce new bugs into the act of domestic violence, right? Like fear that emits an unpleasant odor or bruises that cause herpes. Given the goal was to enact violence... I think fear and herpes would count as features! With respect to wasteful spending... I think you're forgetting that the US dollar is on target for devaluation similar to that of Zimbabwean currency. :B Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- http://twit.tv - What I listen to All Week
Re: [PHP] Re: Exposing PHP/errors on production vs. dev
On Sun, Aug 3, 2008 at 12:22 AM, Chacha C [EMAIL PROTECTED] wrote: Somehow .. I feel this isn't PHP Related. Boy, nothing gets by you, eh? Welcome to the list, new meat. -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php