RE: [PHP-DB] if someone can explain me this - ODBC
| From: | USA) | Date: | Tue, 06 Aug 2002 14:34:41 +0000 |
| Subject: | RE: [PHP-DB] if someone can explain me this - ODBC | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-21011@lists.php.net to get a copy of this message | ||
I had the same problem at first too. I wish I had more time to give more info on this... but
here's a start...
$_SERVER['AUTH_USER'] contains the user that the web server recognizes, the database is
seeing NT AUTHORITY\ANONYMOUS because it is not allowing .... what's the word ... well, it
means that the database server doesn't trust the webserver to tell it who the current user is.
If no one else answers I'll try to get more of this when I have a bit to spare. :-)
<>< Ryan
-----Original Message-----
From: Gabor Niederlaender [mailto:gabor.niederlaender@wu-wien.ac.at]
Sent: Tuesday, August 06, 2002 8:23 AM
To: php-db@lists.php.net
Subject: [PHP-DB] if someone can explain me this - ODBC
Hi!
I used to connect to an SQL-Server from a Webserver on the same
machine using an ODBC Data Source. This way I could make the
user-authentification on NT-Basis like:
odbc_connect("DSN","","");
everything worked fine until I wanted to build up a connection to an
SQL-Server on a different machine.I changed absolutely nothing just
the SQL-Server in the ODBC-DSN, and I got the error message:
Warning: SQL error: [Microsoft][ODBC SQL Server Driver][SQL
Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'., SQL
state 28000 in SQLConnect in ...
although the $_SERVER['AUTH_USER'] contained the right user, and it
was surely not 'NT AUTHORITY\ANONYMOUS LOGON' ...
Where is my user gone???
And then came the most interesting part:
If I accessed the .php file locally from the server (with
http://servername/xxx.php ,but from the server itself), the
connection
has been established.
IS THERE a difference, if I access the server from itself, or from
another computer in the network???
Can somebody explain me all this???
Best regards,
Gabor
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php