In windows, Versions later than PHP5.3 do not support mssql extension. Msdn. microsoft. comen-ussqlserverff657782.aspx first? Click getit to download SQLSRV20.EXE. Decompress the file to ext, the extension folder of php. Open php. ini and add [PHP_PDO_SQLSRV] extensionphp_pdo_sq at the end.
In windows, Versions later than PHP5.3 do not support mssql extension. First http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx? Click get it to download SQLSRV20.EXE. Decompress the file to ext, the extension folder of php. Open php. ini and add [PHP_PDO_SQLSRV] extension = php_pdo_sq at the end.
In windows, Versions later than PHP5.3 do not support mssql extension.
First http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx? Click get it to download SQLSRV20.EXE.
Decompress the file to ext, the extension folder of php.
Open php. ini and add at the end
[PHP_PDO_SQLSRV]
Extension = php_pdo_sqlsrv_53_nts_vc6.dll
[PHP_SQLSRV]
Extension = php_sqlsrv_53_nts_vc6.dll
Save and restart apache. The following is an example of a simple php connection:
”root”,“PWD”=>”root2010″,“Database”=>”master”);$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));}?>
I am using the wamp5.1 Integrated Installation Package. Test on windows server 2008. Php5.4 or later versions fail to be tested.
Original article address: php5.3 how to connect to mssql, thanks to the original author for sharing.