IIS7
PHP 5.3
PHPinfo
Código:
sqlsrv sqlsrv support enabled Directive Local Value Master Value sqlsrv.LogSeverity 0 0 sqlsrv.LogSubsystems 0 0 sqlsrv.WarningsReturnAsErrors On On
Código PHP:
<?php
$serverName = "namehost\SQLEXPRESS";
$connectionInfo = array( "Database"=>"BaseDB", "UID"=>"sa", "PWD"=>"pass");
$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));
}
?>
Código PHP:
Connection could not be established.
Array ( [0] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [code] => 18456 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Error de inicio de sesión del usuario 'sa'. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Error de inicio de sesión del usuario 'sa'. ) [1] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [code] => 18456 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Error de inicio de sesión del usuario 'sa'. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Error de inicio de sesión del usuario 'sa'. ) )