title: Could not find driver, connecting php to sql server
body: <p>Good day, </p>
  
  <p>I am trying to connect to a Microsoft sql server database with the use of php 
  I downloaded the php driver for sql server and placed them in the extension folder. </p>
  
  <p>I made some adjustment to the php.ini file as well, to include the new extensions. </p>
  
  <p>as the webserver, I am using a server that is similar to XAMPP but instead, this server is a portable one where by you can place it on a usb stick and use other machines to do your developmental work. It is called USB WebServer. </p>
  
  <p>Every time I run the php script, i keep getting the error that says:  "could not find driver." I know that this error is an indication that my connection to the database is not successful. I don't know what I have done wrong and I m in need of some help. </p>
  
  <p>The following is my code to connect to the database:</p>
  
  <pre><code>  $DB_HOST = 'DESKTOP-AKQUS0J\SQLEXPRESS';
    $DB_USER = '';
    $DB_PASS = '';
    $DB_NAME = 'slddweb';
  
    try{
   $pdo = new PDO("sqlsrv:Server={$DB_HOST};Database={$DB_NAME}"," 
   {$DB_USER}","{$DB_PASS}");
  
  
     $pdo-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  
    }
    catch(PDOException $e){
     echo $e-&gt;getMessage();
    }
  </code></pre>
  
  <p>the above script is stored in a file by the name of connect.php</p>
  
  <p>And I used the following code to detect which version of php I am currently using: </p>
  
  <pre><code> echo 'Current PHP version: ' . phpversion();
  </code></pre>
  
  <p>which stated that i am using php version 5.4</p>
  
  <p>I downloaded the drivers for php to work with sql server from here:
  <a href="https://www.microsoft.com/en-us/download/details.aspx?id=20098" rel="nofollow noreferrer">https://www.microsoft.com/en-us/download/details.aspx?id=20098</a>
  I downloaded the third file upon clicking the third check box. </p>
  
  <p>Two files by the names of:
  php_sqlsrv_54_ts.dll AND  php_pdo_sqlsrv_54_ts.dll
  were copied to the extension folder which is located into php folder. </p>
  
  <p>these file names were placed into the extension section of the php.ini file.</p>
  
  <p>After i did the above, I restarted the server  ...when i run the php script, i get the error message from the connect.php  </p>
  
  <p>any help would be appreciated. </p>