php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34587 PDO::__construct() error
Submitted: 2005-09-21 20:41 UTC Modified: 2005-09-23 04:13 UTC
From: firman@php.net Assigned:
Status: Closed Package: PDO related
PHP Version: 5.1.0RC1 OS: Windows XP Professional
Private report: No CVE-ID: None
 [2005-09-21 20:41 UTC] firman@php.net
Description:
------------
A PDO::__construct() throwed an exception when I tried to open sqlite database, seem no driver for sqlite.

My dsn is work fine in PHP 5.0.5.

Reproduce code:
---------------
<?php
$dbh = new PDO('sqlite:D:/DB/SQLite/test.db3');
?>

Expected result:
----------------
$dbh is a PDO object.

Actual result:
--------------
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-21 20:50 UTC] helly@php.net
Are you sure pdo_sqlite has been loaded? Try php -m.
 [2005-09-23 04:13 UTC] firman@php.net
On the php info page, available PDO drivers: sqlite2. Then I tried edit my dsn to "sqlite2:D:/DB/SQLite/test.db2". It's work fine. I dunno, seems PDO changes in PHP 5.1.0RC1. Ok fine now, I closed this bugs. Sorry for the noise. Thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 10:01:29 2024 UTC