Hi,
I've been looking at RoundCube from time to time, but now I finally got to install it on my web server. But it doesn't work very well here. This is the blocking bug right now: The SQLite database cannot be initialised. Here's what the installer said:
Check configured database settings
Backend: PEAR::MDB2
DSN (write): OK
Warning: sqlite_create_function() expects parameter 1 to be resource, integer given in /www/web001/roundcube/program/include/rcube_mdb2.inc on line 598 Warning: sqlite_create_function() expects parameter 1 to be resource, integer given in /www/web001/roundcube/program/include/rcube_mdb2.inc on line 599 Warning: sqlite_create_function() expects parameter 1 to be resource, integer given in /www/web001/roundcube/program/include/rcube_mdb2.inc on line 600 Warning: sqlite_create_function() expects parameter 1 to be resource, integer given in /www/web001/roundcube/program/include/rcube_mdb2.inc on line 601 Warning: sqlite_last_error() expects parameter 1 to be resource, integer given in /www/web001/roundcube/program/lib/MDB2/Driver/sqlite.php on line 534 DB Schema: NOT OK(Error creating database schema: MDB2 Error: unknown error Query: _doQuery: [Error message: Could not execute statement] [Last executed query: CREATE TABLE cache ( cache_id integer NOT NULL PRIMARY KEY, user_id integer NOT NULL default 0, session_id varchar(40) default NULL, cache_key varchar(128) NOT NULL default '', created datetime NOT NULL default '0000-00-00 00:00:00', data longtext NOT NULL ); ] [Native message: sqlite_last_error() expects parameter 1 to be resource, integer given] )
Please try to inizialize the database manually as described in the INSTALL guide. Make sure that the configured database extists and that the user as write privileges
Not sure what happened here. Running PHP 5.2.5 with SQLite support enabled and working fine for several other applications. All previous checks of the RC installer were passed.
Another thing is that the PHP files of RC are written in a way that they
can never work without a problem: You start HTML output first and then start the PHP session. I cannot imagine how you didn't notice that during the very first development steps... Starting a PHP session sends an HTTP header, but those cannot be sent after HTTP body has started. How is that supposed to work? The easiest solution would be to put a at the very beginning of every page that starts a PHP session. The more elegant would be to only write page content
after starting the session.
Edit: I've read the INSTALL file and it says that PHP 5 and SQLite 2 are required... Doesn't PHP 5 always come with SQLite 3 only? What's the problem with version 3, which is current for ages by now and working for all my other projects (web and desktop)?
Edit 2: I don't have any "sqlite" binary on that web server machine (running Linux). Where can I get such a database file to start using RoundCube? The SQL dump is quite useless to me if the installer is broken and I don't have the tool to do it on my own.