Re: Problem with /Mail/Queue/Container/db.php

From: Date: Sat, 06 Aug 2005 10:30:27 +0000
Subject: Re: Problem with /Mail/Queue/Container/db.php
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20297@lists.php.net to get a copy of this message
Hi,
I've installed the db.php as you said, from the cvs. However, it still gives a "call to undefined function" error, only line# and fn changed:
*Fatal error*: Call to undefined function: getrow() in */home/secretwl/public_html/fm/Mail/Queue/Container/db.php* on line *302*
I still believe there's a (lost?) connection problem. Who wrote the script didn't check for errors returned by Mail_Queue, so it dies while trying to call a PEAR::DB function (getRow) on a PEAR_Error object. If you have the script, add a few error checks after each method call: =========================== $res = $mail_queue->get(...); if (PEAR::isError($res)) {
    var_dump($res->getUserInfo());
    exit;
} ===========================
as you suggested, I've added an error check after line 302, where the error is reported. The code there is:
        $row = $this->db->getRow($query, null, DB_FETCHMODE_ASSOC);
        if (PEAR::isError($row)) {
    var_dump($row->getUserInfo());
    exit;
}
The result did not change. It still gives exactly the same error. Undefined Function getrow in line 302. There was already some error check in the script, as below:
        $row = $this->db->getRow($query, null, DB_FETCHMODE_ASSOC);
        if (PEAR::isError($row) || !is_array($row)) {
            return new Mail_Queue_Error(MAILQUEUE_ERROR_QUERY_FAILED,
                $this->pearErrorMode, E_USER_ERROR, __FILE__, __LINE__,
                'DB::query failed - "'.$query.'" - '.$row->toString());
        }
Such error codes are frequent in the db.php script. So regarding to the results I got, nothing changed... What else can I do to solve this problem? Regards, Ozer Tayiz.

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