KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
[ante-scriptum : this is a self answered question, you don't need to bother answering] I ran into a weird configuration problem, not documented anywhere on the specific PHP.net page or at StackOverflow. The problem When opening an existing sqlite database on Windows, the same error kept showing : SQLSTATE[HY000] [14] Unable To Open Database File Although the code executed was copy/pasted from the manual : <?php /* Connect to an ODBC database using driver invocation */ $dsn = 'sqlite:/full/path/to/db'; $user = 'dbuser'; $password = 'dbpass'; try { $dbh = new PDO($dsn, $user, $password); } catch (PDOException $e) { echo 'Connection failed: ' . $e->getMessage(); } ?> I could not open this database, as I had tried all kinds of various DSN while googling : $dsn = 'sqlite:/c:\\full\\path\\to\\db'; // --FAILED-- $dsn = 'sqlite://c:/full/path/to/db'; // --FAILED--
Tags (comma-separated)
Save Edits
Cancel