diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-05-02 20:11:45 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-05-02 20:11:45 +0000 |
| commit | 77873a42821416748ad54816a9c6279a1f5fa5f8 (patch) | |
| tree | 9a5d3ca0894e68d0470d1f88506b1a918ed576ec | |
| parent | f502254b34b6445d721caa7989379410c2eb9fc4 (diff) | |
- some hints to use sqlite db (#1485821)
git-svn-id: https://svn.roundcube.net/trunk@2449 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/INSTALL | 5 | ||||
| -rw-r--r-- | roundcubemail/installer/config.php | 2 | ||||
| -rw-r--r-- | roundcubemail/program/include/rcube_mdb2.php | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/roundcubemail/INSTALL b/roundcubemail/INSTALL index 5f2f3dd60..42fd4bbef 100644 --- a/roundcubemail/INSTALL +++ b/roundcubemail/INSTALL @@ -70,9 +70,8 @@ RoundCube with utf-8 charset. * SQLite -------- -Sqlite requires specifically php5 (sqlite in php4 currently doesn't -work with roundcube), and you need sqlite 2 (preferably 2.8) to setup -the sqlite db (sqlite 3.x also doesn't work at the moment). Here is +You need sqlite 2 (preferably 2.8) to setup the sqlite db +(sqlite 3.x also doesn't work at the moment). Here is an example how you can setup the sqlite.db for roundcube: # sqlite -init SQL/sqlite.initial.sql sqlite.db diff --git a/roundcubemail/installer/config.php b/roundcubemail/installer/config.php index f72a0e820..d090312ed 100644 --- a/roundcubemail/installer/config.php +++ b/roundcubemail/installer/config.php @@ -269,7 +269,7 @@ echo '<label for="cfgdbtype">Database type</label><br />'; echo $input_dbhost->show($RCI->is_post ? $_POST['_dbhost'] : $dsnw['hostspec']); echo '<label for="cfgdbhost">Database server (omit for sqlite)</label><br />'; echo $input_dbname->show($RCI->is_post ? $_POST['_dbname'] : $dsnw['database']); -echo '<label for="cfgdbname">Database name</label><br />'; +echo '<label for="cfgdbname">Database name (use a path and filename for sqlite)</label><br />'; echo $input_dbuser->show($RCI->is_post ? $_POST['_dbuser'] : $dsnw['username']); echo '<label for="cfgdbuser">Database user name (needs write permissions)(omit for sqlite)</label><br />'; echo $input_dbpass->show($RCI->is_post ? $_POST['_dbpass'] : $dsnw['password']); diff --git a/roundcubemail/program/include/rcube_mdb2.php b/roundcubemail/program/include/rcube_mdb2.php index 1c491a874..713ff4255 100644 --- a/roundcubemail/program/include/rcube_mdb2.php +++ b/roundcubemail/program/include/rcube_mdb2.php @@ -585,7 +585,9 @@ class rcube_mdb2 $data = file_get_contents($file_name); if (strlen($data)) - sqlite_exec($dbh->connection, $data); + if (!sqlite_exec($dbh->connection, $data, $error) || MDB2::isError($dbh)) + raise_error(array('code' => 500, 'type' => 'db', + 'line' => __LINE__, 'file' => __FILE__, 'message' => $error), TRUE, FALSE); } |
