ez projects / ezsqlite

eZ SQLite database handler

UNIX name Owner Status Version Compatible with
ezsqlite Kristof Coomans planning 0.1 4.x
eZ Publish database handler for SQLite.

This is especially useful in small demo and testing environments, where you don't want the overhead of a real database server.

2 extensions

There are 2 extensions, one called ezsqlite that uses the PHP SQLite functions (sqlite library 2.x), and another called ezsqlite3 that uses the PHP SQLite3 functions (sqlite library 3.x). The ezsqlite3 extension is recommended, although it is currently not part of the PHP main distribution but will be in PHP 5.3.


Make sure you have PHP 5.3 with the sqlite3 extension enabled. Put eZ Publish in the right directory, download the ezsqlite3 extension, and enable it in site.ini. Now fill a clean sqlite database with the eZ Publish schema and the clean data by running these commands from the shell:

php bin/php/ezsqlinsertschema.php --type=sqlite3 --user=foo --password=bar --clean-existing --debug=all share/db_schema.dba [yourdatabasename]
php bin/php/ezsqlinsertschema.php --type=sqlite3 --user=foo --password=bar --debug=all --insert-types=data --schema-file=share/db_schema.dba share/db_data.dba [yourdatabasename]

Set up eZ Publish now to use this database, in site.ini [DatabaseSettings].


Make sure you have PHP 5.2 with the sqlite extension enabled. Follow the same instructions as for ezsqlite3, but replace --type=sqlite3 with --type=sqlite.

SQLite 2.x has some important limitations, and therefore eZ Publish will not be fully functional:

  • COUNT(DISTINCT columnname) is not supported

In memory databases for the eZ Publish test system

Using an SQLite in-memory database makes the eZ Publish test system run much faster:

php tests/runtests.php --dsn="sqlite3://foo:bar@localhost/:memory:" --db-per-test --verbose

In eZ Publish 4.0 some cache files currently won't be stored correctly when using ':memory:', see This issue is solved in eZ Publish 4.1.

No news yet.

This project has no reviews yet. Be the first one to review it!