On Feb 12, 2008 10:25 PM, chasd chasd@silveroaks.com wrote:
I use PostgreSQL ;)
Ah, you are the one! (Just kidding.) Let me dig up if MDB2 has an abstraction.
This error happens to me if I use MySQL, so I don't think it is a MySQL vs. PostgreSQL thing. I use a remote machine for the database(s). The database check in check.php works, so
$db_working = true;
There is an abstraction for the unixtimestamp() thing in rcube_db.inc and rcube_mdb2.inc However I think something is amiss with the rcube_mdb2.inc file.
( looked at the two side-by-side, and there are some differences where I don't think there should be. The version in the header(s) is different between the two [1.16 vs. 1.17], so there might be some bug fixes in rcube_db.inc that aren't in rcube_mdb2.inc There are some references to PEAR:: in rcube_mdb2.inc that I think should be MDB2::)
Basically, one class extends the other. It's fine doing PEAR::isError() or MDB2::isError(). PEAR should be included since it's a direct dependency of MDB2.
You can see PEAR.php here: http://trac.roundcube.net/browser/trunk/roundcubemail/program/lib
If I hardcode using db in a couple lines from check.php instead
require_once 'include/rcube_db.inc'; $DB = new rcube_db($rcmail_config['db_dsnw'], '', false);
Then it works OK with MySQL.
I think there might be some issues in the error handling code initialized by check.php. It isn't that I'm using PostgreSQL, but some database error I have is triggering a code path that you aren't exercising.
You are checking the database connection with raw MDB2:: calls, but then for the timezone checks you use the rcube_mdb2.inc functions. I think you should use the same code path for both.
That could be it. I'll check it out tomorrow! Thanks so far.
Till _______________________________________________ List info: http://lists.roundcube.net/dev/