note 77916 deleted from function.mssql-connect by tularis
| From: | tularis@php.net | Date: | Sun, 13 Apr 2008 12:46:05 +0000 |
| Subject: | note 77916 deleted from function.mssql-connect by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-138261@lists.php.net to get a copy of this message | ||
Note Submitter: colin at shuaige dot org
----
If you're getting a timeout when trying to connect to a remote server, the registry hack seems
to fix it. Another funny way to do this is:
1. Create a DSN to the server you'd like to use, typing in the server's IP or name in the
"Server" drop-down.
2. On the second screen, click "Client Configuration" and change something (anything, but
I unchecked "Dynamically Determine Port").
3. Go through the remaining screens as normal.
4. The "ConnectTo" registry entry will be created. Note that it will NOT be created if you
fail to click "Client Configuration" (ref: http://support.microsoft.com/kb/229929)
5. Edit as stated: "DBNETLIB,$Server[,$Port]"
6. iisreset and your mssql_connect() should now work. You can also actually delete the DSN you
created if you don't need it, since the registry key is not tied to the specific DSN but
instead the list of servers in the DSN wizard.
Also, if you're getting authentication errors (I was on a different server), check to make sure
that mssql.secure_connection is set to 0 or commented out. A 1 setting will cause the web server to
use its Windows authentication (IUSR_) to log in to the SQL Server.