title: ubuntu php sqlite database access error
body: <p>I tested, changed permissions, reinstalled apache2, reconfigured apache2 to public_html, studied the web for solutions for almost a day now. Banging my head to the wall at this point.</p>
  
  <p>This is what I have:</p>
  
  <ol>
  <li><p>medical01 - sqlite3 database, with the table persons in it, table filled with 101 records</p></li>
  <li><p>the php script:</p>
  
  <pre><code>ini_set('display_errors', 'On');
  error_reporting(E_ALL);
  echo '1';
  $location = 'sqlite:/medical01';
  echo '2';
      $dbhandler = new PDO($location);
  echo '3';
  </code></pre></li>
  <li><p>permissions:
  -> folder medical that contains the following files:</p>
  
  <pre><code>drwxr-sr-x 2 gabriel www-data 4096 Nov  5 16:55 medical
  
  -rwxr-sr-x 1 gabriel www-data  1634 Nov  5 11:49 index.php
  -rwxr-sr-x 1 gabriel www-data 11264 Nov  5 10:51 medical01
  -rwxr-sr-x 1 gabriel www-data   386 Nov  5 13:32 script01.php
  -rwxr-sr-x 1 gabriel www-data   163 Nov  5 16:55 script02.php
  </code></pre></li>
  </ol>
  
  <p>As you can see, everything is in one folder. This is what I get when running the script02 file in firefox:</p>
  
  <pre><code>Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [14] unable to open database file' in /home/gabriel/public_html/medical/script02.php:7 Stack trace: #0 /home/gabriel/public_html/medical/script02.php(7): PDO-&gt;__construct('sqlite:/medical...') #1 {main} thrown in /home/gabriel/public_html/medical/script02.php on line 7
  </code></pre>
  
  <p>Any help would be appreciated, as at this point I am desperate.</p>