Ticket #121 (closed defect: fixed)

Opened 11 months ago

Last modified 10 months ago

SQLite broken in r1311

Reported by: tinyau Owned by:
Priority: critical Milestone: 0.4
Component: Habari Core Software Version: SVN
Keywords: Cc:

Description

r1311 using SQLite

After upgraded to r1311, the web site no longer work. The following message is shown when tried to connect to the site.

Uncaught Exception: Exception: PDO::prepare() [function.PDO-prepare]: SQLSTATE[HY000]: General error: 1 unrecognized token: "{"

After amended the version number from 1310 to 1170 in version.php, the site can access again. Seems like add cronjob in r1311 cannot be worked properly under SQLite.

Change History

Changed 11 months ago by rickc

Utils:truncate_log() uses MySql syntax. The Sqlite equivalent to

DATE_SUB(NOW(), INTERVAL 14 DAY)

should be

date('now', '-14 days')

http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions has a list of all Sqlite's date and time functions.

Changed 10 months ago by ringmaster

  • status changed from new to closed
  • resolution set to fixed

Fixed in r1332.

Note: See TracTickets for help on using tickets.