RE: [PHP-DB] RE: if someone can explain me this - ODBC

From: Date: Tue, 06 Aug 2002 17:17:12 +0000
Subject: RE: [PHP-DB] RE: if someone can explain me this - ODBC
Groups: php.db 
Request: Send a blank email to php-db+get-21016@lists.php.net to get a copy of this message
I like the way I have it working much better because it takes full advantage of Integrated Authentication. I still don't have too much time to explain. But the Domain user that is connected to the webserver becomes the user of the database. Since I have a fairly complex security model it gives me the ability to create roles and assign users based on their real identity. That way if 1 person goes and their account is disabled, their access is removed all the way down to the database. It is well worth the effort, even if you begin by putting everyone in the same role, because you have the flexibility for the future. Come to think of it I know why it's working for me. The SQL server is the webserver. There's still a way to make it work the same between servers... it's on the tip of my pointy little brain... <>< Ryan -----Original Message----- From: Gabor Niederlaender [mailto:gabor.niederlaender@wu-wien.ac.at] Sent: Tuesday, August 06, 2002 11:03 AM To: php-db@lists.php.net Subject: [PHP-DB] RE: if someone can explain me this - ODBC 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#21016) next »