|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-12 10:38 UTC] tellme dot 3 dot n1 at dfgh dot net
[2021-05-03 11:43 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Package: PDO_SQLITE
+Package: *General Issues
-Assigned To:
+Assigned To: cmb
[2021-05-03 11:43 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 14:00:01 2025 UTC |
Description: ------------ I'm not sure if this is the correct forum for this bug, as it's a bug when using sqlite2 DSN (PHP 5.1.4). The problem is that the call to new PDO(...) returns NULL when the DSN specifies a relative path and no error is issued. (I realize that the instructions say to use an absolute path, but since this is not necessary with the sqlite lib in PHP, this silent death is bound to cause perplexion for users.) Reproduce code: --------------- $pdo = new PDO("sqlite2:./my.db"); Expected result: ---------------- PHP Fatal error: Uncaught exception 'PDOException' with message 'could not connect to database ....' Actual result: -------------- NULL