title: sqlite correct path/URI for php pdo on windows
body: <p>[ante-scriptum : this is a self answered question, you don't need to bother answering]</p>
  
  <p>I ran into a weird configuration problem, not documented anywhere on the <a href="http://www.php.net/manual/en/ref.pdo-sqlite.connection.php" rel="noreferrer">specific PHP.net page</a> or at StackOverflow. </p>
  
  <h2>The problem</h2>
  
  <p>When opening an existing sqlite database on Windows, the same error kept showing : </p>
  
  <p><code>SQLSTATE[HY000] [14] Unable To Open Database File</code></p>
  
  <p>Although the code executed was copy/pasted from the manual : </p>
  
  <pre><code>&lt;?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-&gt;getMessage();
  }
  
  ?&gt;
  </code></pre>
  
  <p>I could not open this database, as I had tried all kinds of various DSN while googling : </p>
  
  <p><code>$dsn = 'sqlite:/c:\\full\\path\\to\\db'; // --FAILED--</code></p>
  
  <p><code>$dsn = 'sqlite://c:/full/path/to/db'; // --FAILED--</code></p>