Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP SQL Server Couldn't connect
    text
    copied!<p>I want to ask you about how to connect to MSSQL Server 2005 using PHP?</p> <p>I got error like this :</p> <blockquote> <p>Connection could not be established. 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>and here is my PHP code :</p> <pre><code>&lt;?php $serverName = "192.168.183.249\MSSQLSERVER, 1542"; //serverName\instanceName, portNumber default is 1433) $connectionInfo = array( "Database"=&gt;"SEI_AproCS", "UID"=&gt;"sa", "PWD"=&gt;""); $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn ) { echo "Connection established.&lt;br /&gt;"; }else{ echo "Connection could not be established.&lt;br /&gt;"; die( print_r( sqlsrv_errors(), true)); } ?&gt; </code></pre> <p>Please help to advice.</p> <p>THanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload