HELP! ODBC-->SQL Server Authentication
| From: | Daaron Dwyer | Date: | Mon, 10 Dec 2001 21:08:25 +0000 |
| Subject: | HELP! ODBC-->SQL Server Authentication | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-14914@lists.php.net to get a copy of this message | ||
Hello All,
I am trying to use the windows authentication of the user surfing on the
database I am connecting to.
I have made myself a user on the database the ODBC DSN is pointing to.
Here is the script:
<script language="php">
$db=odbc_pconnect("EOSTest", "", "");
$result=odbc_exec($db,"select system_user");
odbc_result_all($result);
</script>
When I surf to this page, I am presented with the login, at which I enter my
username, password and domain.
And here is the result:
Warning: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login
failed for user 'NT AUTHORITY\ANONYMOUS LOGON'., SQL state 28000 in
SQLConnect in C:\Inetpub\Apps\provisioning\test.php on line 2
Warning: Supplied argument is not a valid ODBC-Link resource in
C:\Inetpub\Apps\provisioning\test.php on line 3
Warning: Supplied argument is not a valid ODBC result resource in
C:\Inetpub\Apps\provisioning\test.php on line 4
I have restricted the security on the page to just the domain admin group
that I am in.
So why would it be using an anonymous login?
Something that may bear on this is that I had to uncheck "high encryption"
in the ODBC configuration, because SQL Server did not support high
encryption.
Help!
Thanks!