On Feb 12, 2008 8:18 PM, chasd chasd@silveroaks.com wrote:
Fatal error: Call to undefined function: raise_error() in /Users/ chasd/Sites/roundcube/program/include/rcube_mdb2.inc on line 104
Did you just get the script or full trunk?
svn update to rev 1050.
Full trunk contains MDB2:
Yeah I saw the "A" s next to the added files from the version I had before.
Since I set the include_path() in the beginning, MDB2 should therefor be available.
Yep, MDB2 is working.
Personally I don't intend to "support" DB that much longer. It's old, slower and also deprecated. Which is why I hardcoded.
Didn't know db was deprecated, I'll switch my internal testing instance to mdb2.
I still think there is an issue.
If I put
require_once 'include/bugs.inc';
on the line before
require_once 'include/rcube_mdb2.inc';
then I get another error -
Fatal error: Call to undefined method: mdb2_error->query() in / Users/chasd/Sites/roundcube/program/include/rcube_mdb2.inc on line 234
The MDB2 error can't bubble up because bugs.inc isn't included for some reason.
Nope: http://trac.roundcube.net/browser/trunk/roundcubemail/program/include/rcube_mdb2.inc
It means that you don't have a DB resource, but an MDB2-Error object instead. ;-)
How exactly do you reproduce this?
The actual error is caused by you using a MySQL-ism "unixtimestamp()" which is not a function in PostgreSQL or SQLite. I use PostgreSQL ;)
Ah, you are the one! (Just kidding.) Let me dig up if MDB2 has an abstraction.
roundcube=# SELECT UNIX_TIMESTAMP(now()) AS tz_db; ERROR: function unix_timestamp(timestamp with time zone) does not exist
For PostgreSQL I think you'll want to use something like
SELECT extract(epoch from date_trunc('seconds', current_timestamp)) AS tz_db;
or
SELECT extract(epoch from date_trunc('seconds', localtimestamp)) AS tz_db;
For SQLite you'll need something like
SELECT strftime("%s",datetime('NOW'));
Thanks!
I'll see about this!
Till _______________________________________________ List info: http://lists.roundcube.net/dev/