SQLite 3.2.8 Binary
Posted by Will Bond on 1/3/09 at 11:15 pm, no comments
Recent Blogs
- Prepared Statement Support Added posted 3/4/10
- Contributing posted 11/16/09
- New Oracle Support and More Tests posted 5/28/09
- Discussions and Comments posted 1/14/09
- Flourish Demo Site posted 1/5/09
About
Flourish is The PHP Unframework, a general-purpose, object-oriented PHP library designed to reduce code and improve security.
If you are working with a server running PHP 5.1.x (such as a VPS with CentOS 4) you may have run into an issue with using SQLite as a database. The version of the sqlite3 command line program is 3.3.6, however the version of the SQLite library used for the PDO SQLite driver is 3.2.8. To complicate matters further, between versions 3.2.8 and 3.3.0 the database file format was changed in a way that databases created by 3.3.0 and newer are not readable by 3.2.8 and before.
In practical terms, this means you can't use the sqlite3 binary provided by the OS to create a database to use with PHP.
Unfortunately the SQLite website has removed all source and binary files for everything before 3.6.x. While I was unable to find a 3.2.8 binary for linux, I was able to find a copy of the source tarball from an old Ubuntu repository, and I have mirrored it here along with a statically linked binary that I compiled.
Downloads
Simple/Quick Instructions
The following directions will allow you to create a new SQLite 3.2.8 database on any linux server where you have SSH access:
- Log onto the server
- Execute: wget http://static.flourishlib.com/sqlite_3.2.8/sqlite3
- Execute: chmod 755 sqlite3
- Create a database: ./sqlite3 my_new_db
Compiling
If the pre-compiled binary I provided above does not work on your system, you should be able to fairly easily compile your own binary. You'll need standard compilation tools such as gcc, make, etc installed on your system.
- tar xvfz sqlite3_3.2.8.tar.gz
- cd sqlite-3.2.8
- ./configure --disable-tcl --disable-shared
- make
Once those four steps are complete, there will be an executable named sqlite3 in the current directory. You can use that to create databases that will be compatible with the PDO SQLite driver in PHP 5.1.x.

RSS Feed
Twitter
Ohloh
GitHub
Bitbucket
Launchpad
IRC