|  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: 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]
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:
$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'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-21 20:50 UTC]
Are you sure pdo_sqlite has been loaded? Try php -m.
 [2005-09-23 04:13 UTC]
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-2021 The PHP Group
All rights reserved.
Last updated: Tue Sep 28 05:03:38 2021 UTC