ez projects / ezsqlite
|UNIX name||Owner||Status||Version||Compatible with|
This is especially useful in small demo and testing environments, where you don't want the overhead of a real database server.
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:
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 http://issues.ez.no/13761. This issue is solved in eZ Publish 4.1.