title: sqlsrv_connect: Data source name not found and no default driver specified
body: <p>I am trying to connect to SQL Server 2008 on machine-1 from PHP code on another machine-2.
  I am using PHP 5.4.7, XAMPP 1.8.1 and I have copied the sql server dlls into PHP/ext folder and modified the php.ini file.</p>
  
  <p>Now, when I try to connect to SQL server I am getting following error.</p>
  
  <blockquote>
    <p>Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 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 the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 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 ) ) </p>
  </blockquote>
  
  <p>My PHP code is as follows -</p>
  
  <pre><code>&lt;?php
  //phpinfo(); 
  $server = "sql server\express,1433"; //serverName\instanceName, portNumber (default is 1433)
  $uid="username";
  $pwd="password";
  $connectionInfo = array("UID" =&gt; $uid, "PWD" =&gt; $pwd, "Database"=&gt;"rod_prd_tmart");
  $conn = sqlsrv_connect( $server, $connectionInfo) ;
  
  if($conn) 
  {
     echo "Connection established.\n";
  } else
  {
     echo "Connection could not be established in this text.\n";
     die( print_r( sqlsrv_errors(), true));
  }
  
  sqlsrv_close( $conn);
  ?&gt;
  </code></pre>
  
  <p>Please help me resolve this issue. Thanks.</p>