Sqlsrv_connect() error
<p>I'm trying to connect PHP 5.3.5 to  MS Sql Server 2005. I'm using Windows XP SP3. I enabled the sqlsrv function which is also shown in phpinfo(). I also made some changes in the php.ini extension but I keep getting following error:</p>

<blockquote>
  <p>"Database connection errorArray ( [0] => Array ( [0] => IMSSP
  [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => This extension
  requires either the Microsoft SQL Server 2008 Native Client (SP1 or
  later) or the Microsoft SQL Server 2008 R2 Native Client ODBC Driver
  to communicate with SQL Server. Neither of those ODBC Drivers are
  currently installed. Access the following URL to download the
  Microsoft SQL Server 2008 R2 Native Client ODBC driver for x86:
  <a href="http://go.microsoft.com/fwlink/?LinkId=163712" rel="nofollow">http://go.microsoft.com/fwlink/?LinkId=163712</a> [message] => This
  extension requires either the Microsoft SQL Server 2008 Native Client
  (SP1 or later) or the Microsoft SQL Server 2008 R2 Native Client ODBC
  Driver to communicate with SQL Server. Neither of those ODBC Drivers
  are currently installed. Access the following URL to download the
  Microsoft SQL Server 2008 R2 Native Client ODBC driver for x86:
  <a href="http://go.microsoft.com/fwlink/?LinkId=163712" rel="nofollow">http://go.microsoft.com/fwlink/?LinkId=163712</a> ) [1] => Array ( [0] =>
  IM002 [SQLSTATE] => IM002 [1] => 0 [code] => 0 [2] => [Microsoft][ODBC
  Driver Manager] Data source name not found and no default driver
  specified [message] => [Microsoft][ODBC Driver Manager] Data source
  name not found and no default driver specified ) ) 1"</p>
</blockquote>

<p>I've installed <code>sqlncli.msi</code> , <code>SQLSRV20.exe</code> and <code>SQLSRV30.exe</code> but I'm still getting the same error.</p>

<p>My program to connect:</p>

<pre><code>&lt;?php
$server = "Patrik/SQLEXPRESS";
$conInfo = array("Database"=&gt;"ShoppingDetail","UID"=&gt;"Pat1890","PWD"=&gt;"Pat1890");

$con = sqlsrv_connect($server,$conInfo);

if($con==false)
 {
  echo "Error Connecting to database&lt;br&gt;";
   die (print_r(sqlsrv_errors()));
  }
else
{
  echo "Database connection is sucessfully eastablished";
}
?&gt; 
</code></pre>

<p>I think there is no problem in my coding. I also enabled TCP/IP and used the IP address instead of servername but the problem still persists.</p>
