Posted May 14, 2011
I've been trying all day to connect a simple PHP script to the SQL Server installed on my machine. I'm using IIS7.5 if that matters somehow.
I really don't get what I'm doing wrong, since every change leads to another error, and I can say I've had enough if it.
Can someone post a simple example of connecting SQL Server to PHP using Windows Authentication?
Also, where do I see the exact server name? In SQL Server Management Studio the name is ANGEL-G71G, but in SQL Server Configuration Manager the name is MSSQLSERVER.
This is the error that I get:
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 'NT AUTHORITY\IUSR'. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'NT AUTHORITY\IUSR'. ) [1] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [code] => 18456 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'NT AUTHORITY\IUSR'. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'NT AUTHORITY\IUSR'. ) )
EDIT: God fucking dammit. 4 hours of messing around, doing crap and all that.
So I put all SQL Server features to auto freaking start on log in, enabled all connections through named pipes, tcp/ip and what else not... Still didn't work...
Restarted my lappy, and now it works... What the eeeeeffffffffffffffffffffff...
I really don't get what I'm doing wrong, since every change leads to another error, and I can say I've had enough if it.
Can someone post a simple example of connecting SQL Server to PHP using Windows Authentication?
Also, where do I see the exact server name? In SQL Server Management Studio the name is ANGEL-G71G, but in SQL Server Configuration Manager the name is MSSQLSERVER.
This is the error that I get:
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 'NT AUTHORITY\IUSR'. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'NT AUTHORITY\IUSR'. ) [1] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [code] => 18456 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'NT AUTHORITY\IUSR'. [message] => [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'NT AUTHORITY\IUSR'. ) )
EDIT: God fucking dammit. 4 hours of messing around, doing crap and all that.
So I put all SQL Server features to auto freaking start on log in, enabled all connections through named pipes, tcp/ip and what else not... Still didn't work...
Restarted my lappy, and now it works... What the eeeeeffffffffffffffffffffff...
Post edited May 14, 2011 by KavazovAngel