title: PHP / PDO / SQL Server. Uncaught PDOException: could not find driver
body: <p>I have a simple script which works in PHP 5.6 but does not work in PHP 7.0:</p>
  
  <pre><code>$conn = new PDO("sqlsrv:Server=10.6.2.105;Database=mydb", "myuname", "mypwd");
  $sql = "SELECT TOP 3 txt FROM mytab";
  foreach ($conn-&gt;query($sql) as $row)
      print $row["txt"] . "\r\n";
  </code></pre>
  
  <p>When I run it in PHP 7.0, I get the following error:</p>
  
  <pre><code>Uncaught PDOException: could not find driver
  </code></pre>
  
  <p>According to <a href="http://php.net/manual/en/pdo.installation.php" rel="nofollow noreferrer">http://php.net/manual/en/pdo.installation.php</a> I don't need extension=php_pdo.dll in my php.ini file in versions above 5.3 for windows installs.</p>
  
  <p>I do have the following though:</p>
  
  <pre><code>extension=php_pdo_mysql.dll
  extension=php_pdo_oci.dll
  extension=php_pdo_sqlite.dll
  </code></pre>
  
  <p>Also, I can use sql server directly, just not with PDO.</p>
  
  <p>What else do I need to get this working?  Where do I find the driver for this?</p>
  
  <p>Details:</p>
  
  <pre><code>PHP 7.0.5
  Windows 8.1
  NTS x86
  </code></pre>