1: настройки, связанные с вашим файлом php.ini:
a) Search mssql.secure_connection and put it on if it's off
b) remove comment from the dll extention php_mssql.dll
2: настройки, относящиеся к файлам dll.
download a file name ntwdblib.dll from the internet.
Note: (if path not known can be found in php.ini for variable extension_dir)
3: перезапустить сервер
<?php
$serverName = "serverName\\sqlexpress"; //serverName\instanceName
$connectionInfo = array( "Database"=>"dbName", "UID"=>"userName", "PWD"=>"password");
$conn = sqlsrv_connect( $serverName, $connectionInfo)
or die(“Couldn’t connect to SQL Server on $myServer”);
// select a database to work with
$selected = mssql_select_db($myDB, $dbhandle)
or die(“Couldn’t open database $myDB”);