title: Create SQLite database in memory
body: <p>Trying to learn a bit about PDO and is going through <a href="http://www.phpro.org/tutorials/Introduction-to-PHP-PDO.html" rel="nofollow noreferrer">this tutorial</a>. It has the following snippet of code:</p>
  <pre><code>&lt;?php
  
    try
    {
      $db = new PDO('sqlite::memory');
      echo &quot;SQLite created in memory.&quot;;
    }
    catch(PDOException $e)
    {
      echo $e-&gt;getMessage();
    }
  </code></pre>
  <p>When I run this I get the following exception message:</p>
  <blockquote>
  <p>SQLSTATE[HY000] [14] unable to open database file</p>
  </blockquote>
  <p>What does that mean? How can I get it to work? I am able to connect to a MySQL database and also a regular SQLite database file. So I know at least something is working...</p>
  <p>I'm on Windows 7 64-bit with Apache 2.2.11 and PHP 5.3.0 (latest <a href="http://www.wampserver.com/" rel="nofollow noreferrer">WampServer</a> install). <code>phpinfo()</code> reports that I have pdo_sqlite with SQLite Library 3.6.15 enabled.</p>