What I need to do is to be able to connect to a sql database on a sql server 2008 database using a php script. The script is running on IIS 6 on the same server as the sql server. I am using php 5.3.2 and the command sqlsrv_connect to connect. I am passing this method a user name, password, database, and server to connect to. However when I do I get the error "Login failed for user ......." I do not know if the sql server 2008 is set up correctly or not to accept a connection like this.
I have IIS using an anon connection because the php script has a user name a password being passed into the script. I need to be able to use these values to confirm a login for the the sql server.
Actual error:
Array ( [0] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [code] => 18456 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'ecriss'. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user '..........'. ) [1] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [code] => 18456 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user '...........'. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user '..........'. ) )
Thank you for the help