Подключение к SQL Server 2008 через PHP
Мне нужно подключиться к SQL Server 2008 через PHP (WAMP, последняя версия). У меня установлены и настроены драйверы sqlsrv, и они отображаются вphpinfo()
.
Я использую следующие строки для подключения к моей БД, используя проверку подлинности Windows:
$serverName = "(local)";
$connectionOptions = array("Database"=>"MyTestDatabase");
$conn = sqlsrv_connect( $serverName, $connectionOptions) or die("Error!");
И я получаю следующую ошибку:
Array
(
[0] => Array
(
[0] => IMSSP
[SQLSTATE] => IMSSP
[1] => -49
[code] => -49
[2] => This extension requires the Microsoft SQL Server 2011 Native Client. Access the following URL to download the Microsoft SQL Server 2011 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712
[message] => This extension requires the Microsoft SQL Server 2011 Native Client. Access the following URL to download the Microsoft SQL Server 2011 Native Client ODBC driver 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
)
)
Любая помощь будет отличной, но, пожалуйста, будьте конкретны, поскольку я действительно не знаю, как обходиться с WAMP, за исключением нескольких основ