=> 10061 [2] => [Microsoft][SQL Server Native Client 10.0]TCP Provider: Подключение не установлено, т.к. конечный компьютер отверг запрос на подключение. [message] => [Microsoft][SQL Server Native Client 10.0]TCP Provider: Подключение не установлено, т.к. конечный компьютер отверг запрос на подключение. ) [1] => Array ( [0] => HYT00 [SQLSTATE] => HYT00 [1] => 0 [code] => 0 [2] => [Microsoft][SQL Server Native Client 10.0]Login timeout expired [message] => [Microsoft][SQL Server Native Client 10.0]Login timeout expired ) [2] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 10061 [code] => 10061 [2] => [Microsoft][SQL Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. [message] => [Microsoft][SQL Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. ) )
код вот такой:
[PHP]
$serverName = "(local), 1433"; //serverName\instanceName, portNumber (default is 1433)
$connectionInfo = array( "Database"=>"site");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
[/PHP]
пробовал и не local писать, пробовал добавлять логин и пароль для sql авторизации - не помогает. В mssql авторизация стоит смешанная, в SQL server managment studio под win авторизацией без проблем заходит.. в чем может быть дело?