SQLite databases created with SQLite version 2 cannot be used with SQLite 3, and vice versa. The file formats between these two versions are incompatible.
Zend_Db uses the PDO_SQLITE extension. This supports the SQLite 3 format, and cannot open a SQLite 2 database. Does this help? Regards, Bill Karwin > -----Original Message----- > From: Jeunejean Pierre [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 29, 2007 9:39 AM > To: fw-general@lists.zend.com > Subject: [fw-general] Uncaught exception 'Zend_Db_Adapter_Exception' with > message 'SQLSTATE[HY000]: General error: 26 file is encrypted or is not a > database' > > Hi everyone, > > I try to connect to an SQLite 2 DB with Zend_Db, without success, same > error with the 2 following syntaxes (the first precise 'sqlite2' as > dsnprefix value). > Connecting to the same DB with Propel 2 does not cause any problem. > > Someone would be kind to help me on this ? > > $params = array ('dbname' => "D:\websites\ola_lu\ola_lu.db", > 'dsnprefix' => 'sqlite2'); > $db = Zend_Db::factory('PDO_SQLITE', $params); > > OR > > $params = array ('dbname' => "D:\websites\ola_lu\ola_lu.db"); > $db = Zend_Db::factory('PDO_SQLITE', $params); > > same error: > > *Fatal error*: Uncaught exception 'Zend_Db_Adapter_Exception' with > message 'SQLSTATE[HY000]: General error: 26 file is encrypted or is not > a database' in > D:\websites\himalaya\library\Zend\Db\Adapter\Pdo\Abstract.php:156 Stack > trace: #0 > D:\websites\himalaya\application\models\be\adnexus\himalaya\HyaForm.php(22 > 5): > Zend_Db_Adapter_Pdo_Abstract->query('SELECT * FROM h...') #1 > D:\websites\himalaya\application\controllers\HyaobjectController.php(93): > HyaForm->import('a:17:{i:0;a:2:{...') #2 > D:\websites\himalaya\library\Zend\Controller\Action.php(488): > HyaobjectController->importAction() #3 > D:\websites\himalaya\library\Zend\Controller\Dispatcher\Standard.php(214): > Zend_Controller_Action->dispatch('importAction') #4 > D:\websites\himalaya\library\Zend\Controller\Front.php(753): > Zend_Controller_Dispatcher_Standard- > >dispatch(Object(Zend_Controller_Request_Http), > Object(Zend_Controller_Response_Http)) #5 > D:\websites\himalaya\library\Zend\Controller\Front.php(202): > Zend_Controller_Front->dispatch() #6 > D:\websites\ola_lu\www\himalaya\inde in > *D:\websites\himalaya\library\Zend\Db\Adapter\Pdo\Abstract.php* on line > *156* > > > > -- > Pierre Jeunejean > gérant > > [EMAIL PROTECTED] > www.adnexus.be > > Wirtzfeld 3a, B-4760 Büllingen > Tel: 0478556586 > > A D N E X U S > Solutions informatiques Internet en sous-traitance pour les agences > publicitaires. > Solutions informatiques de gestion sur mesure pour les entreprises. > >