History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: ZF-164
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Gavin
Reporter: Asger Hallas
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Zend Framework

$_pdoType is not a property when using Sqlite

Created: 29/Jun/06 12:03 PM   Updated: 05/Jul/07 02:44 PM
Component/s: Zend_Db
Affects Version/s: 0.1.4, 0.1.3
Fix Version/s: 0.1.5

Time Tracking:
Not Specified

File Attachments: 1. File zf-164.diff (5 kb)

External References:
Re: [fw-general] About issue ZF-164 (Confluence: Zend Framework List Archive: FW-GENERAL)
Returnpath: <fwgeneralreturn4140zf.general=runbox.com@lists.zend.com> Received: (qmail 24452 invoked by uid 100); 3 Jul 2006 20:40:52 0000 MessageID: <11784599.1151993824988.JavaMail.root@framework.zend.com> Date: Mon, 03 Jul 2006 13:40:20 0700 From: ...

Resolution Date: 03/Jul/06 03:13 PM


 Description  « Hide
I get this:

Notice: Undefined property: Zend_Db_Adapter_Pdo_Sqlite::$_pdoType in D:\web\localhost\indsigt\private\lib\ZendFramework-0.1.3-trunk\Zend\Db\Adapter\Pdo\Abstract.php on line 79

Notice: Undefined property: Zend_Db_Adapter_Pdo_Sqlite::$_pdoType in D:\web\localhost\indsigt\private\lib\ZendFramework-0.1.3-trunk\Zend\Db\Adapter\Pdo\Abstract.php on line 80

=> The driver is noget currently installed

When trying to do this:

$params = array ('dbname' => './private/app/sql/core.db');
$db = Zend_Db::factory('pdoSqlite', $params);
Zend_Db_Table::setDefaultAdapter($db);
class RoundTable extends Zend_Db_Table {}
$table = new RoundTable();



 All   Comments   Work Log   Change History   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Gavin - 29/Jun/06 06:18 PM
In the file Zend/Db/Adapter/Pdo/Abstract.php, look in the function _connect() .

If the SQLite extension is not available to your local copy of PHP, then it should throw an error.


Asger Hallas - 29/Jun/06 08:04 PM
I looked through the files, and as far as I can see the error thrown should be 'The '.$_pdoType.'driver is not currently installed'... but it prints: 'The driver is noget currently installed'.

It does the check on an empty $_pdoType and fails. PDO is installed on my local copy, and it worked fine until I checked out from SVN today.


Gavin - 30/Jun/06 12:48 PM
Aha, I see. From your first comment, "=> The driver is noget currently installed" I though you were telling me this, instead of those words being the actual output of the program. Reopening issue ..

Rui Hirokawa - 01/Jul/06 10:52 AM
I have a same problem on ZF 0.1.4.

_pdoType is not defined in Zend_Db_Adapter_Pdo_Sqlite.
Please add a line,
protected $_pdoType = 'sqlite';
in line 45 of SZend/Db/Adapter/Pdo/qlite.php.


Gavin - 03/Jul/06 02:24 PM
TODO: Relocate the tests and checks performed on instatiation/connection to a new class (e.g. laboratory component) that uses Zend_Environment.

Specifically, Zend/Db/Adapter/Pdo/Abstract.php:_connect() should not be performing tests on every connection. Instead the checks should be relocated outside of the Zend Framework core components.

Please check the attached patch and comment about it. There are some advantages and some disadvantages


Mike Naberezny - 03/Jul/06 03:13 PM
Fixed in changeset [791].

Gavin - 06/Jul/06 04:30 PM
See the FishEye link above for information about the change.

Also, when the manual is rebuilt (soon), we will see an example showing the use of the dsnprefix configuration key to specify an alternative PDO driver for the PDO_SQLITE Zend_Db adapter.


Jayson Minard - 11/Jul/06 11:54 AM
0.1.5 released