Re: How to use Windows Authentication (SSPI) with mssql_connect command ?
| From: | Dan Shirah | Date: | Thu, 31 May 2007 19:31:19 +0000 |
| Subject: | Re: How to use Windows Authentication (SSPI) with mssql_connect command ? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-28028@lists.php.net to get a copy of this message | ||
I know you don't need it to connect/update the database. I was thinking
more along the lines of using it for an event logging type of scenario.
User A opens and processes an order. Upon completion User A saves the order
with its new status. Would it be possible to extract who User A is by
pulling the name out of the NT authentication required to access the server?
Almost like how a session works by storing the username after someone logs
in. But instead of them having to log in, it would just pull the "username"
from their NT account.
On 5/31/07, Frank M. Kromann <frank@kromann.info> wrote:
that will be the user configured under IIS (IUSR_<host name>). You don't need that information to update the database you should be able to cal mssql_connect() without any parameters. - Frank If you set mssql.secure_connection = On, is there a way in PHP where you can then retrieve the username of the person that is trying to update the database? On 5/30/07, Frank M. Kromann <frank@kromann.info> wrote:use the mssql.secure_connection = On in your php.ini file and makesurethe IIS users has access to the database. - FrankwithHi, Does someone knows how to use the Windows Authentication (SSPI)failedmssql_connect() ? Here's my trouble : I'm using an MS SQL Server 2000 and use the windows credential tolog...I can logon SSPI with ASP and Javascript using ADO... But it doesn't seems to work with PHP My Server is a Windows 2003 with MS SQL 2000 and IIS 6.0 and PHP5.2.2.2I changed the following value to use the NT authentication ... mssql.secure_connection = On But when i try to connect supplying only the server... i get thefollowingerror : Warning: mssql_connect() [function.mssql-connect]: message: Loginforlineuser '(null)'. Reason: Not associated with a trusted SQL Serverconnection.(severity 14) in C:\Inetpub\wwwroot\portail\Outils\functions.php on280And here's my authentication options in IIS ( see attachment ) Could someone explain to me how to supply windows credential to PHPusingmssql_connect method Thanks Mat -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php