Re: Problem with /Mail/Queue/Container/db.php
| From: | Ozer Tayiz | Date: | Sun, 07 Aug 2005 09:10:00 +0000 |
| Subject: | Re: Problem with /Mail/Queue/Container/db.php | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20310@lists.php.net to get a copy of this message | ||
Hi,
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:as you suggested, I've added an error check after line 302, where the error is reported. The code there is: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$row = $this->db->getRow($query, null, DB_FETCHMODE_ASSOC); if (PEAR::isError($row)) {var_dump($row->getUserInfo()); exit; }
Again, I test it by trying to subscribe using a web form. Again, I get an error. This time, it is:$this->db =& DB::connect($options['dsn'], true); if (PEAR::isError($this)) { var_dump($this->getUserInfo()); exit; } /** This was the original if clause.{ return new Mail_Queue_Error(MAILQUEUE_ERROR_CANNOT_CONNECT, $this->pearErrorMode, E_USER_ERROR, __FILE__, __LINE__, 'DB::connect failed: '. DB::errorMessage($this->db)); } */ else { $this->db->setFetchMode(DB_FETCHMODE_ASSOC); }
*Fatal error*: Call to undefined function: setfetchmode() in */home/secretwl/public_html/fm/Mail/Queue/Container/db.php* on line *109*Before I edited the script, there was no error with setfetchmode(). Did I do something wrong? It seems to keep getting worse, the more I edit it... 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. I only changed code on what to do if there is an error with $this. 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? Is there anyone who could make this script work for me, if I have given him ftp access etc? Or am I asking too much from a free forum? Should I pay for it? Please respond by personal email, if you can make this thing work within a reasonable time (and fee, if needed). Regards, Ozer Tayiz.