title: Cannot Call function sqlsrv_connect()
body: <p>I went through several questions and recommendation to resolve the above issue, but No luck at all.</p>
  <p>I have the following settings:</p>
  <blockquote>
  <p>Windows Server 2008 R2</p>
  <p>x<img src="https://i.stack.imgur.com/sDu0A.jpg" alt="enter image description here" />ampp-win32-1.8.2-5-VC9-installer</p>
  <p>SQLSRV30 - php driver</p>
  <p>sqlncli - Microsoft SQL Server 2008 R2 Native Client Set Up</p>
  </blockquote>
  <p>I installed everything else and I have the following on the php.ini file
  The code below show where the php drivers are residing:</p>
  <pre><code>; On windows:
  extension_dir=&quot;C:\xampp\php\ext&quot;
  </code></pre>
  <p><img src="https://i.stack.imgur.com/v413G.jpg" alt="enter image description here" />
  The following is under windows extensions</p>
  <pre><code>extension=php_pdo_sqlsrv_54_ts.dll
  extension=php_sqlsrv_54_ts.dll
  </code></pre>
  <p><img src="https://i.stack.imgur.com/3nxU4.jpg" alt="enter image description here" /></p>
  <p>When I check the phpinfo file sqlsrv is not listed. I know this may imply that its not installed, but It is installed.</p>
  <p>The following is the php info file:</p>
  <p>I also restarted apache and the server.  Am I missing something ?</p>
  <p>I get the following error:</p>
  <blockquote>
  <p>Call to undefined function sqlsrv_connect()</p>
  </blockquote>
  <p>This the code I am using to connect: I am connecting to another server which is hosting SQL Server 2005</p>
  <pre><code>/Connection to SQL Server Database
      error_reporting(E_ALL);
  $serverName = &quot;172.xx.x.xxx&quot;;
  
  $connectionInfo = array('Database'=&gt;'Eque', &quot;UID&quot;=&gt;&quot;develop&quot;, &quot;PWD&quot;=&gt;&quot;develop&quot;);
  $conn = sqlsrv_connect($serverName, $connectionInfo);
  
  
  if($conn) {
       echo &quot;Connection established.&lt;br /&gt;&quot;;
  }else {
      echo  &quot;Connection could not be established.&lt;br /&gt;&quot;;
      die(print_r(sqlsrv_errors(), true));
  }
  </code></pre>