title: PHP Connect to 4D Database
body: <p>Trying to connect to 4D Database. PHPINFO says PDO is installed etc etc... Testing on localhost MAMP system. However when I run my code I get:</p>
  
  <pre><code> Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /Applications/MAMP/htdocs/4d/index.php:12 Stack trace: #0 /Applications/MAMP/htdocs/4d/index.php(12): PDO-&gt;__construct('4D:host=127.0.0...', 'test', 'test') #1 {main} thrown in /Applications/MAMP/htdocs/4d/index.php on line 12
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code>$dsn = '4D:host=127.0.0.1;charset=UTF-8';
  $user = 'test';
  $pass = 'test';
  
  // Connection to the 4D SQL server
  $db = new PDO($dsn, $user, $pass);
  
  try {
  echo "OK";
  } catch (PDOException $e) {
  die("Error 4D : " . $e-&gt;getMessage());
  }
  </code></pre>
  
  <p>Can't put my finger on the error, i'm using the settings under the PHP tab...</p>
  
  <p>Thank you.</p>