title: PDO SQLite3 connection failure when database is in different folder
body: <p>I'm trying to connect to a sqlite3 database from php, but I'm hitting a brick wall when I want to place my db somewhere convenient and outside of web accesible space. When db file is in the same folder as my php script it runs ok, but when I place it somewhere else - silent fail.</p>
  
  <p>I've written up a simple checker so it would be easier to understand what I mean</p>
  
  <pre><code>&lt;?php
  $files = array(
     'data.db',
      getcwd() . DIRECTORY_SEPARATOR . 'data.db',
     'some_inner_folder' . DIRECTORY_SEPARATOR . 'data.db',
      getcwd() . DIRECTORY_SEPARATOR . 'some_inner_folder' . DIRECTORY_SEPARATOR . 'data.db'
  );
  
  foreach($files as $file) {
      if(file_exists($file))
          echo $file, ' found&lt;br/&gt;';
      else
          echo $file, ' not found!&lt;br/&gt;';
      try {
          $db = new PDO('sqlite:host=' . $file);
          if($db)
              echo 'connection to ', $file, ' made succesfully&lt;br/&gt;';
      } catch (PDOException $error) {
          echo 'error connecting to ', $file, ' error message: ', $error-&gt;getMessage(), '&lt;br/&gt;';
      }
      $db = null;
  }
  </code></pre>
  
  <p>Output turned out to be:</p>
  
  <pre><code>data.db found
  connection to data.db made succesfully
  C:\Web\data.db found
  error connecting to C:\Web\data.db error message: SQLSTATE[HY000] [14] unable to open database file
  some_inner_folder\data.db found
  error connecting to some_inner_folder\data.db error message: SQLSTATE[HY000] [14] unable to open database file
  C:\Web\some_inner_folder\data.db found
  error connecting to C:\Web\some_inner_folder\data.db error message: SQLSTATE[HY000] [14] unable to open database file
  </code></pre>
  
  <p>C:\Web\data.db and C:\Web\some_inner_folder\data.db has the same contents (file copy&amp;paste)</p>
  
  <p>PHP Version 5.3.6, Windows 7 x64</p>
  
  <p>PDO drivers mysql, sqlite, sqlite2</p>
  
  <p>SQLite Library  3.7.4</p>
  
  <p>I'm not really seeing why it doesn't work.</p>
  
  <p>Problem solved</p>
  
  <pre><code>$db = new PDO('sqlite:host=' . $file);
  </code></pre>
  
  <p>should read like this:</p>
  
  <pre><code>$db = new PDO('sqlite:' . $file);
  </code></pre>
  
  <p>Turns out pdo_sqlite doesn't need 'host='</p>