note 53552 added to function.mssql-connect
| From: | jackdotrautaattiscalidotdk at osu1 dot php dot net | Date: | Sun, 05 Jun 2005 23:30:00 +0000 |
| Subject: | note 53552 added to function.mssql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-89976@lists.php.net to get a copy of this message | ||
I couldn't connect to a remote MSSQL database using Windows Server 2003, IIS 6, PHP 5 and
mssql_connect. It worked with odbc_connect and with DSN-less connection through ADODB COM object.
The solution was to change a registry entry, as follows:
1) Open regedit.exe
2) Browse to the key named HKEY_LOCAL_MACHINE\\SOFTWARE \\Microsoft\\MSSQLServer\\Client\\ConnectTo
3) There should be one or more keys in the format "SERVER" =
"LIBRARY,SERVER,PORT"
where SERVER is a NetBIOS name, Named Pipe alias or the server's IP address, and PORT is
usually 1433.
4) If LIBRARY is set to DBMSSOCN, try changing it to DBNETLIB. That worked for me.
5) Restart IIS
----
Manual Page -- http://www.php.net/manual/en/function.mssql-connect.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53552
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53552&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53552&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53552&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53552&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53552&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53552&report=yes
Search -- http://master.php.net/manage/user-notes.php