Re: Re: Basic? problem with logger not solved

From: Date: Fri, 19 Aug 2005 17:35:47 +0000
Subject: Re: Re: Basic? problem with logger not solved
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20489@lists.php.net to get a copy of this message
On 8/19/05, Sabine <phpdev@sric.de> wrote: > With the Log-package I must do something totally wrong. > I think it's a basic problem, but I'm blind to it. > Perhaps you see it on the first glance? > > With every logger I get "Call to undefined function"-messages. > > <script> > require_once('./inc_pear.php'); > require_once('PEAR.php'); > require_once('Log.php'); > > $conf = array('title' => 'Sample Log Output'); > $logger = &Log::singleton('win', 'LogWindow', 'ident', > $conf); > </script> > > --> Fatal error: Call to undefined function: upto() in > /mypearpath/PEAR/Log/win.php on line 78 > Nearly any time you get an undefined function error it's because you're not checking for errors. I'm 99% sure this is your problem. Put this before any use of the log variable: if (PEAR::isError($logger)) { die($logger->getMessage()); } -- Justin Patrin

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