title: This extension requires the Microsoft ODBC Driver 11 for SQL Server to communicate with SQL Server
body: <p>ALready downloaded the sqlsrv on microsoft...</p>
  
  <p><a href="https://i.stack.imgur.com/kM51k.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kM51k.png" alt="enter image description here"></a></p>
  
  <p>and on my phpinfo()</p>
  
  <p><a href="https://i.stack.imgur.com/1rAaL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1rAaL.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/MuRGl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MuRGl.png" alt="enter image description here"></a></p>
  
  <p>enabled on <code>php.ini</code> on both <code>C:\wamp\bin\apache\apache2.4.9\bin</code> and <code>C:\wamp\bin\php\php5.5.12</code>
  <a href="https://i.stack.imgur.com/qaArn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qaArn.png" alt="enter image description here"></a></p>
  
  <p>and still got error like this.</p>
  
  <pre><code>Failed to get DB handle: SQLSTATE[IMSSP]: This extension requires the Microsoft ODBC Driver 11 for SQL Server to communicate with SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 
  </code></pre>
  
  <p>and my code is </p>
  
  <pre><code>try {
      $dbh = new PDO ("sqlsrv:Server=$host;Database=$db","$user","$pass");
    } catch (PDOException $e) {
      echo "Failed to get DB handle: " . $e-&gt;getMessage() . "\n";
      exit;
    }
    $stmt = $dbh-&gt;prepare("select top 5 from teams");
    $stmt-&gt;execute();
    while ($row = $stmt-&gt;fetch()) {
      print_r($row);
    }
    unset($dbh); unset($stmt);
  </code></pre>