Re: mail queue problem

From: Date: Wed, 30 Mar 2005 17:07:12 +0000
Subject: Re: mail queue problem
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18418@lists.php.net to get a copy of this message
On Wed, 30 Mar 2005 01:21:22 +0100, Daniel Mc Inerney <0128805@student.ul.ie> wrote: > > > But im already getting an error message, I gave it in the last email: > "call to undefined method DB_Error::quote() in > C:\wamp\php\PEAR\Mail\Quote\Container\db.php". > > Is another error message which I should be seeing? Yes. That is a PHP Fatal error message because the script you're using is treating a DB_Error object like it is a DB_Result object. The DB_Error is returned from a DB::connect() call because DB can't connect to the database you gave it. You should do something like this: function pe($err) { die($err->getMessage().' '.$err->getUserInfo()); } PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'pe'); This is only for development use, of course, but it should tell you what's failing. > > > -----Original Message----- > From: Justin Patrin [mailto:papercrane@gmail.com] > Sent: 29 March 2005 21:51 > To: Daniel Mc Inerney > Cc: pear-general@lists.php.net > Subject: Re: [PEAR] mail queue problem > > On Tue, 29 Mar 2005 20:11:51 +0100, Daniel Mc Inerney > <0128805@student.ul.ie> wrote: > > I recently installed the mail queue package. the install was successful > and > > the package tested fine when running it in my web browser. i used the test > > files (add_example.php and send_example.php) included in the package. > > however i wanted to introduce the cron feature so that emails would be > sent > > automatically so i knew that for this feature to work i would have to call > > the send_example script from the command line. I tried this and i got the > > following error: > > > > "call to undefined method DB_Error::quote() in > > C:\wamp\php\PEAR\Mail\Quote\Container\db.php". > > > > i also tried running the add_example script in the command line just to > see > > what would happen and it produced the same error, not recognising any > > methods belonging to DB_Error. Im really confused because both these > scripts > > ran fine when i ran them in internet explorer.(i usually save all of my > > files in a www folder and then call them using the address > > "http://localhost/the_name_of_the_script.php") > > > > anyone know why these scripts might be failing on the command line? > > > > any help would be much appreciated! thanks > > > > > > The DB connection is failing. Add a PEAR error handler which outputs > the message. > -- Justin Patrin

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