Roundcube Community Forum

 

SQLite backend DB not working in 1.1.3 on Windows - [SOLVED!]

Started by nullrequest, September 22, 2015, 11:50:57 AM

Previous topic - Next topic

nullrequest

I created a bug ticket here: http://trac.roundcube.net/ticket/1490547

SQLite won't return query results, but appears to connect and will return current date (now).  I'm running the latest Roundcube version (1.1.3).

I created the SQLite DB using SQLiteman, and ran the intial setup SQL script.  Also tried letting the installer create the DB, but that doesn't work, even though installer says it does (error that can't find DB that doesn't exist).

I tried to make some of the calls manually by hacking up the installer page, and there are clearly issues. Several test queries return empty arrays, but selecting now() works fine and returns a result, which suggests to me that RoundCube/PHP can connect to the DB OK.

I can provide my config.inc.php file if needed.




DB Error in X:\xxxxxxxxxxxxxx\xxxxxxxxxxx\roundcubemail\program\lib\Roundcube\rcube_db.php (546): [1] no such table: session (SQL Query: SELECT "vars", "ip", "changed", datetime('now') AS ts FROM "session" WHERE "sess_id" = 'l33jumas4qfmi7s2i3aoe60o21')

Warning: session_start(): Cannot send session cache limiter - headers already sent in X:\xxxxxxxxxxxxxx\xxxxxxxxxxx\roundcubemail\program\lib\Roundcube\rcube_session.php on line 117
DB Error: [1] no such table: session
DB Error in X:\xxxxxxxxxxxxxx\xxxxxxxxxxx\roundcubemail\program\lib\Roundcube\rcube_db.php (546): [1] no such table: identities (SQL Query: SELECT * FROM "identities" WHERE "del" <> 1 AND "user_id" = NULL ORDER BY "standard" DESC, "name" ASC, "email" ASC, "identity_id" ASC)
Window control
About
Logout
Application tasks
Mail
Address Book
Settings
Logo

DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.
DB Error in X:\xxxxxxxxxxxxxx\xxxxxxxxxxx\roundcubemail\program\lib\Roundcube\rcube_db.php (546): [1] no such table: session (SQL Query: INSERT INTO "session" ("sess_id", "vars", "ip", "created", "changed") VALUES ('l33jumas4qfmi7s2i3aoe60o21', 'dGVtcHxiOjE7bGFuZ3VhZ2V8czo1OiJlbl9VUyI7', '127.0.0.1', datetime('now'), datetime('now')))


nullrequest

FYI - I was able to get this solved thanks to Alec in discussions on my ticket.

For anyone else that comes across this, you need to use 3 slashes prefixing your path:

// NOTE: for SQLite use "sqlite:///" (3 slashes) plus an absolute path:
// on linux use 'sqlite:////full/path/to/sqlite.db?mode=0646'
// on windows use 'sqlite:///c:/full/path/to/sqlite.db'


Roundcube doesn't use the standard PDO syntax for SQLite connections (as of v1.1.3)