Connection could not be established.
Posted: Wed Apr 20, 2011 4:52 am
Hi i am running an iis server with php and i got mssql extension, but i get an error when i try to connect to it with php:
Connection could not be established. Array ( [0] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [codé] => 18456 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Inloggningen misslyckades f�r anv�ndaren FB\exalell. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Inloggningen misslyckades f�r anv�ndaren FB\exalell. ) [1] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [codé] => 18456 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Inloggningen misslyckades f�r anv�ndaren FB\exalell. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Inloggningen misslyckades f�r anv�ndaren FB\exalell. ) )
It's complaing about the user but the user is dbowner.
This is the connection i use:
I need help 
Connection could not be established. Array ( [0] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [codé] => 18456 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Inloggningen misslyckades f�r anv�ndaren FB\exalell. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Inloggningen misslyckades f�r anv�ndaren FB\exalell. ) [1] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [codé] => 18456 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Inloggningen misslyckades f�r anv�ndaren FB\exalell. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Inloggningen misslyckades f�r anv�ndaren FB\exalell. ) )
It's complaing about the user but the user is dbowner.
This is the connection i use:
Code: Select all
$connectionInfo = array('Database'=>'fb_intra', 'UID'=>'FB\exalell', 'PWD'=>'pw');
$conn = sqlsrv_connect( "localhost\FB_INTRA", $connectionInfo);
if( $conn )
{
echo "Connection established.\n";
}
else
{
echo "Connection could not be established.\n";
die( print_r( sqlsrv_errors(), true));
}