Issues

ZF-3006: Zend_Cache SQLite backend creates SQLite 2.x databases

Description

Apparently, Zend_Cache SQLite backend creates SQLite 2.x databases that most GUI tools fail to open them because they support only SQLite 3.x databases. Need an option to specify which version of SQLite database files to create (2.x, 3.x). Maybe, use PDO sqlite while creating the database file?

Further, under unix, the sqlite db file is created as a unix executable with the following privileges:

_www : Read & Write staff : Read & Write everyone : Read & Write

Is this an issue with not being able to open the file in sqlite GUI tools?

Comments

Zend_Cache_SQLite is creating sqlite2 databases probably because it is using the library: http://www.php.net/manual/en/ref.sqlite.php

To create sqlite3 databases, it may have to use: http://www.php.net/manual/en/ref.pdo-sqlite.php

Please evaluate and categorize/assign as necessary.

I agree with you, this could be an option of the Sqlite backend

It would be great to use SQLite 3.x databases.

What I can not understand is why Zend_Cache_Backend_Sqlite makes native database calls when calls could be made through Zend_Db_Adapter_Pdo_Sqlite. If I am correct, Zend_Db_Adapter_Pdo_Sqlite supports SQLite2 and SQLite3 databases. Surely making calls on a Zend_Db_Adapter would make things more flexable?

I think Zend_Cache_Backend_Sqlite should be able to be constructed with a path to a Sqlite file OR a Zend_Db_Adapter. Although it might not be wise to use many other Zend_Db_Adapter types, the choice should be mine.

Hi,

I'm working on a Zend_Cache refactoring proposal. This would handle all SQLite versions and php adapters.

Please take a look and tell your opinions.

PS: A native sqlite call is much faster and some sql's ( e.g. CREATE ) are not same on all databases ;)

change Assignee because I'm inactive now

This will be fixed in ZF 2.0 on using one of the installed extensions sqlite3, pdo_sqlite or sqlite and/or based on Pádraic's Zend_Cache_Backend_Database proposal.

Hi, did you noticed that in Ubuntu 11.10, support of Sqlite 2.x has been dropped down? It is true for the desktop version, and also for the server one. See, the issue in Launchpad: https://bugs.launchpad.net/ubuntu/+source/…

For who want to use Zend_Cache with SQLite3 support on v1x follow this link: http://gencergenc.wordpress.com/2012/01/…