Zend Framework

Zend_Cache SQLite backend creates SQLite 2.x databases

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.5.1
  • Fix Version/s: Next Major Release
  • Component/s: Zend_Cache
  • Labels:
    None

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?

Activity

Hide
Shekar Reddy added a comment -

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

Show
Shekar Reddy added a comment - 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
Hide
Wil Sinclair added a comment -

Please evaluate and categorize/assign as necessary.

Show
Wil Sinclair added a comment - Please evaluate and categorize/assign as necessary.
Hide
Fabien MARTY added a comment -

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

Show
Fabien MARTY added a comment - I agree with you, this could be an option of the Sqlite backend
Hide
thing2b added a comment -

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.

Show
thing2b added a comment - 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.
Hide
Marc Bennewitz (private) added a comment -

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

Show
Marc Bennewitz (private) added a comment - 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
Hide
Fabien MARTY added a comment -

change Assignee because I'm inactive now

Show
Fabien MARTY added a comment - change Assignee because I'm inactive now
Hide
Marc Bennewitz (private) added a comment -

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.

Show
Marc Bennewitz (private) added a comment - 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.
Hide
Ame Nomade added a comment -

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/php5/+bug/875262

Show
Ame Nomade added a comment - 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/php5/+bug/875262
Hide
Gencer added a comment -

For who want to use Zend_Cache with SQLite3 support on v1x follow this link:
http://gencergenc.wordpress.com/2012/01/28/zend-zend_cache-with-sqlite3-support/

Show
Gencer added a comment - For who want to use Zend_Cache with SQLite3 support on v1x follow this link: http://gencergenc.wordpress.com/2012/01/28/zend-zend_cache-with-sqlite3-support/

People

Vote (6)
Watch (6)

Dates

  • Created:
    Updated: