Re: DB_DataObject debugging - confused by production mode (newbie)

From: Date: Thu, 20 Oct 2005 20:15:48 +0000
Subject: Re: DB_DataObject debugging - confused by production mode (newbie)
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21567@lists.php.net to get a copy of this message
On 10/20/05, philip reed <philipreedtech@gmail.com> wrote: > I'm having trouble making DB_DataObject's debug() methods work, and > I'm confused by > apparently conflicting documentation as to whether I'm in production mode: > > > *http://pear.php.net/manual/en/package.database.db-dataobject.db-dataobject.debug.php > makes references to "the production setting in the configuration file" > and "production mode". > > * > http://pear.php.net/manual/en/package.database.db-dataobject.intro-configuration.php > doesn't contain the word "production" that I can find. > > *I don't see anything about production in my config.ini from which I'm > loading DB_DataObject options. > > *grepping the source code for production finds a note in package.xml > from 2003-03-06 that says, "- removed production option (not required > due to improved config storage)" but I can't tell if this is relevant. > > *At line 3755 of DataObject.php I find this comment: > > // no checks for production here?....... > DB_DataObject::debug($message,"ERROR",1); > return $error; > > > So it's not at all clear to me whether the production config option is > live, and if so, how I would make sure it's not set. > > Of course other things could be going wrong too that I need to > troubleshoot, but this seems to be a good place to start. > > TIA for answering this newbie's question. > I've never seen any "production" setting myself, so I'm not sure what the docs are referring to. As for debug, you can set this manually yourself. DB_DataObject::debugLevel(<some number from 1-5>); If you're in production just don't set debug (or set it to 0). -- Justin Patrin

« previous php.pear.general (#21567) next »