note 69857 added to function.mssql-connect

From: Date: Sat, 23 Sep 2006 20:19:24 +0000
Subject: note 69857 added to function.mssql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-117475@lists.php.net to get a copy of this message
Ok, so after many many many hours of searching (somewhere around the ballpark of 2 weeks, on and off) and reading these pages, I've found the answer to my unspoken question (although there was much cursing). Background: A Windows Server 2003 box running as a router and a webserver using IIS6 and the latest PHP 5 as of 23 Sep 2006. A Windows Server 2003 box running SQL 2000 Enterprise with one instance Using a named pipe, the code to connect was: "$connection = mssql_connect("\\.\pipe\MSSQL$instance\sql\query", "user", "pass") or die("Message"); " I recieved the error that $instance was not a defined variable, so I changed it to "\\.\pipe\MSSQLinstance\sql\query" both on the connection string and the SQL server When passed on to the server, I still recieved connection errors, so I changed it again, this time to: "$connection = mssql_connect("\\\\.\pipe\\MSSQLinstance\\sql\\query", "user", "pass") or die("Message"); " With this new code, I recieved a successful connection, but a bad login saying that my IUSR_ account did not have permissions on the database, although I used a separate username in the connection string. Using SQL, I setup windows authentication for the IUSR_ account and I was able to establish a connection and successfully run a query. I still can't find out why it was trying to pass the IUSR_ account as the login though. If anyone has an answer drop me a line. Now using windows groups it should be easy to create a login page that uses groups to connect to databases rather than setting up each user individually. I just wanted to share with everyone my long awaited success story. ---- Server IP: 64.71.164.2 Probable Submitter: 24.250.224.150 ---- Manual Page -- http://www.php.net/manual/en/function.mssql-connect.php Edit -- https://master.php.net/note/edit/69857 Del: integrated -- https://master.php.net/note/delete/69857/integrated Del: useless -- https://master.php.net/note/delete/69857/useless Del: bad code -- https://master.php.net/note/delete/69857/bad+code Del: spam -- https://master.php.net/note/delete/69857/spam Del: non-english -- https://master.php.net/note/delete/69857/non-english Del: in docs -- https://master.php.net/note/delete/69857/in+docs Del: other reasons-- https://master.php.net/note/delete/69857 Reject -- https://master.php.net/note/reject/69857 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#117475) next »