RE: if someone can explain me this - ODBC
| From: | Gabor Niederlaender | Date: | Tue, 06 Aug 2002 17:02:51 +0000 |
| Subject: | RE: if someone can explain me this - ODBC | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-21015@lists.php.net to get a copy of this message | ||
Hi Ryan!
I got the solution, I think...
It isnt't working,because the I_USR is only a local thing and cannot
be used on other computers in the network. The solution I have is, to
connect with a fixed user to the DB, and then find out through
$_SERVER['AUTH_USER'] who really uses the DB.
I thought, you cannot logon with a fixed account, because you cannot
find out, who is the one, that uses the DB. As it is possible, it is
not really a problem, who makes the connection, is it?
Regards,
Gabor
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
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php