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

From: Date: Mon, 15 Aug 2005 16:13:00 +0000
Subject: Re: Problem with /Mail/Queue/Container/db.php
References: 1 2 3 4 5 6 7  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20423@lists.php.net to get a copy of this message
Hi,
as you suggested, I've added an error check after line 302, where the error is reported.
I meant you should add the check in your script, not in the Mail_Queue files.
No, you need to put it *before* that call and it needs to check $this->db. You should put it just after $this->db is set.
Sorry, I'm not a php programmer, just installing a script, so this debugging thing really is hard for me... Anyway, as I understand it, I searched for the first appearance of $this->db , found it on line 94, and edited the following error code as below:
$this->db =& DB::connect($options['dsn'], true); if (PEAR::isError($this)) {
    var_dump($this->getUserInfo());
    exit;
}
the above snippet should read: ============================================== $this->db =& DB::connect($options['dsn'], true); if (PEAR::isError($this->db)) {
    var_dump($this->db->getUserInfo());
    exit;
} ==============================================
Puff... This debugging is to hard for me to do manually. I have no idea what all "$this" means, neither the error messages... Why the hack it gives an "undefined function" error, while it was defined a moment ago beats me.
it happens because the previous variable doesn't contain the same object anymore (PEAR_Error instead of PEAR::DB), and the new object doesn't have the same methods as the one previously referenced by that variable.
I also don't understand how this "undefined fn" can be related to db connection... Why doesn't it say so, like "can't connect db: wrong password" then?
maybe it does, you just don't check for it in the right place. If you post *your* script and tell us where exactly the error happens, maybe we can help you. I can't tell without looking at the source. Best regards, -- Lorenzo Alberton http://pear.php.net/user/quipo

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