note 49461 added to function.mssql-connect

From: Date: Fri, 28 Jan 2005 19:08:38 +0000
Subject: note 49461 added to function.mssql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-84135@lists.php.net to get a copy of this message
Connecting to MS SQL server over TCP/IP. I'm working on Windows XP with PHP5 (should work with PHP4 also because ntwdblib.dll is the same). My problem was that I needed to connect to remote MS SQL server over TCP/IP (named pipes weren't an option), but I couldn't, because named pipes were used all the time. One of the possible solutions is to install SQL Client Tools and configure TCP/IP support. I hadn't SQL Server installation disk, so I found fast solution with registry editing. I added to registry following entry: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ MSSQLServer\Client\ConnectTo] (strip space) "DSQUERY"="DBNETLIB" It worked! Just specify servername in form "host" or "host,port". I successfully connected to remote MSSQL7 and MSSQL2000. I have found on Internet alternative solution that you need to add "DSQUERY"="DBMSSOCN", but it didn't work for me. If you need more connection tweaking like [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ MSSQLServer\Client\DB-Lib] (strip space) "AutoAnsiToOem"="ON" "UseIntlSettings"="ON" and more, then better find and install SQL Client Tools. ---- Manual Page -- http://www.php.net/manual/en/function.mssql-connect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49461 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49461&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49461&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49461&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49461&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49461&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49461&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84135) next »