Note that there are some explanatory texts on larger screens.

plurals
  1. POsqlsrv_connect: Data source name not found and no default driver specified
    primarykey
    data
    text
    <p>I am facing difficulties in connecting PHP with SQL SERVER 2008 running on a remote computer. I have php version 5.4.3 and apache 2.2.22. I already have SQL SERVER 2008 running on my computer. I have following files included in my wamp\bin\php\php5.4.3\ext folder:</p> <ul> <li>php_sqlsrv_54_ts.dll</li> <li>php_pdo_sqlsrv_54_ts.dll</li> </ul> <p>On running simple code like</p> <pre><code>$conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn ) { echo "Connection established.\n"; } else { echo "Connection could not be established.\n"; die( print_r( sqlsrv_errors(), true)); } </code></pre> <p>I am getting following error:</p> <pre><code>Connection could not be established. Array ( [0] =&gt; Array ( [0] =&gt; IMSSP [SQLSTATE] =&gt; IMSSP [1] =&gt; -49 [code] =&gt; -49 [2] =&gt; 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: http://go.microsoft.com/fwlink/?LinkId=163712 [message] =&gt; 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: http://go.microsoft.com/fwlink/?LinkId=163712 ) [1] =&gt; Array ( [0] =&gt; IM002 [SQLSTATE] =&gt; IM002 [1] =&gt; 0 [code] =&gt; 0 [2] =&gt; [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified [message] =&gt; [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified ) ) </code></pre> <p>But I dont know why I am being asked for <strong>Microsoft SQL Server 2012 Native Client</strong> installation.</p> <p>phpI have tried <a href="https://stackoverflow.com/a/9921725/1465910">this link</a> but with no success. </p> <p>Thanks in Advance.</p> <p><strong><em>UPDATE 1:</em></strong></p> <p>I downloaded php 5.3.1 and followed <a href="http://forum.ragezone.com/f723/setup-wampserver-mssql-841598/" rel="nofollow noreferrer">this tutorial</a> and scripts works like a charm.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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