I've downloaded SQLSRV32.EXE from the official MSSQL Driver for PHP and extracted php_sqlsrv_56_ts.dll & php_pdo_sqlsrv_56_ts.dll into C:\wamp\bin\php\php5.6.19\ext
Added the following declaration in the php.ini from the WAMP menu.
extension=php_pdo_sqlsrv_56_ts.dll
extension=php_sqlsrv_56_ts.dll
I then run the sample code from the reference page.
I couldn't connect to the MS SQL Server due to the following error
Connection could not be establish
Array ( [0] => Array ( [0] => IMSSP [SQLSTATE] => IMSSP [1] => -49 [code] => -49 [2] => This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 [message] => This extension requires the Microsoft ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712 ) [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 ) )
I've tried to download the ODBC Driver 13 (for Windows 10) but it is not working. Can someone tell me what I'm doing wrong?
As I can see - ODBC Driver 13 is not supported on your system and the required one is ODBC Driver 11.
https://www.microsoft.com/en-us/download/details.aspx?id=36434