Author Topic: Making sqlite 3.x work  (Read 20538 times)

Offline andrew.fyfe

  • Newbie
  • *
  • Posts: 2
Updated instructions and patches for roundcube-0.7
« Reply #15 on: December 22, 2011, 06:10:58 PM »
Updated instructions and patches for roundcube-0.7:

Required files:
Instructions:
  • Download the required files
  • Patch SQL/sqlite.initial.sql and SQL/sqlite.update.sql with 0001-Fix-broken-SQL-statement.patch
  • Extract the MDB2 Driver (MDB2_Driver_pdoSqlite.tar.bz2) to program/lib/MDB2/Driver
  • Patch program/lib/MDB2/Driver/pdoSqlite.php with 0003-Fix-a-typo-in-pdoSqlite-driver-for-MDB2.patch
  • Copy SQL/sqlite.initial.sql to SQL/pdoSqlite.initial.sql
  • Copy SQL/sqlite.update.sql to SQL/pdoSqlite.update.sql
  • Patch program/include/rcube_mdb2.php with 0005-Add-support-for-pdoSqlite-to-roundcube.patch
  • Set your database driver to pdoSqlite in config/db.inc.php

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,603
    • http://SKaero.com/
Making sqlite 3.x work
« Reply #16 on: December 22, 2011, 07:01:08 PM »
Have you submitted a ticket for this problem?

Offline andrew.fyfe

  • Newbie
  • *
  • Posts: 2
Making sqlite 3.x work
« Reply #17 on: December 23, 2011, 12:20:43 AM »
Quote from: skaero;37751
Have you submitted a ticket for this problem?


It's already been submitted and fixed 1488255
« Last Edit: December 23, 2011, 12:41:23 AM by andrew.fyfe »

Offline double

  • Newbie
  • *
  • Posts: 3
Does not work for me
« Reply #18 on: March 05, 2012, 09:06:58 AM »
Applied this patches against 0.7.1.
No chance, won't work.

Error:
DATABASE ERROR: CONNECTION FAILED!
Unable to connect to the database!
Please contact your server-administrator.

sqlite2 is not in the CentOS6 repositiory, is it?

Thanks a lot
Markus

Offline double

  • Newbie
  • *
  • Posts: 3
Making sqlite 3.x work
« Reply #19 on: March 05, 2012, 10:27:48 AM »
Errormessage:
MDB2 Error: not found Query: unable to find package 'MDB2_Datatype' file 'MDB2/Datatype.php' in /home/www/roundcubemail-0.7.1/program/include/rcube_mdb2.php on line 717 (GET /roundcubemail-0.7.1/)

Offline mamash

  • Newbie
  • *
  • Posts: 9
Re: Making sqlite 3.x work
« Reply #20 on: April 15, 2012, 03:26:32 PM »
Thanks to andrew.fyfe for the corrections. I'm migrating my mail server, and starting with 0.7.2 from scratch, and still works for me just fine.

Offline mgillespie

  • Newbie
  • *
  • Posts: 2
Re: Making sqlite 3.x work
« Reply #21 on: May 08, 2012, 06:17:24 PM »
Any plans to get this patch into the SVN mainstream?  lack of sqllite is a showstopper for me.  I can't run full SQL on a NAS..  Sqllite2 is being removed from many distros now.

I tried to apply these patches, but it didn't work for me...  It's not really clear what's been fixed already, what's part of the patch etc.
« Last Edit: May 08, 2012, 06:20:51 PM by mgillespie »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,603
    • http://SKaero.com/
Re: Making sqlite 3.x work
« Reply #22 on: May 08, 2012, 09:22:57 PM »
This problem was already fixed (see ticket #1488255 http://trac.roundcube.net/ticket/1488255) if your having problems with the latest version you should open up a new ticket.

Offline mgillespie

  • Newbie
  • *
  • Posts: 2
Re: Making sqlite 3.x work
« Reply #23 on: May 09, 2012, 02:31:25 PM »
This problem was already fixed (see ticket #1488255 http://trac.roundcube.net/ticket/1488255) if your having problems with the latest version you should open up a new ticket.

Are you saying Sqlite3 support is in the latest SVN? So what bits of this do I need and no longer need to do?

I have switched to Debian Wheezy from Squeeze, and all I know, is roundcube no longer works, and it's being a right old faff to get it going...

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,603
    • http://SKaero.com/
Re: Making sqlite 3.x work
« Reply #24 on: May 09, 2012, 04:03:43 PM »
Sqlite is supposedly supported, I'm not sure what version is supported (I'm not a RoundCube developer) but the changes in this thread have already been applied to the RoundCube core.

Offline mamash

  • Newbie
  • *
  • Posts: 9
Re: Making sqlite 3.x work
« Reply #25 on: May 09, 2012, 04:07:45 PM »
SQlite has been supported for a long time, but only in the 2.x version (which is quite old and may not be supported at several places). I'm pretty sure nothing has happened on this front at RC, and since it depends on the MDB2 Pear modules for its database drivers, and there is no official MDB2 SQLite 3 driver yet (as far as I know…).

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,603
    • http://SKaero.com/
Re: Making sqlite 3.x work
« Reply #26 on: May 09, 2012, 06:59:30 PM »
I see what you mean, I found this ticket http://trac.roundcube.net/ticket/1488255 with the version 3 problem. My guess is you could patch RC with the bottom 3 files listed in the first post but I think some of the code has changed.

Offline mamash

  • Newbie
  • *
  • Posts: 9
Re: Making sqlite 3.x work
« Reply #27 on: May 10, 2012, 03:42:34 AM »
mgillespie: i think you're looking for this: http://trac.roundcube.net/ticket/1488332

The bad news is that it doesn't look like the RC devs have any plans to write their own SQLite3 support (as there doesn't seem to be an official MDB2 driver for SQLite3 coming, and using the PHP sqlite3 extension or the PDO driver would require adding some substantial code to RC). So the current SQLite support in RC doesn't have much sense, as SQLite2 is being phased out everywhere.

The good news is that the unofficial driver (from http://pear.php.net/bugs/bug.php?id=6907) and my patches still work fine on the latest RC release. I'm using it on my live system even.