note 53552 deleted from function.mssql-connect by cmb
| From: | cmb@php.net | Date: | Sun, 11 Aug 2019 12:32:36 +0000 |
| Subject: | note 53552 deleted from function.mssql-connect by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211854@lists.php.net to get a copy of this message | ||
Note Submitter: jack dot rauta at tiscali dot dk
----
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