note 26785 added to function.mssql-connect
| From: | damien at mightyoaks dot com | Date: | Tue, 12 Nov 2002 22:03:45 +0000 |
| Subject: | note 26785 added to function.mssql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39412@lists.php.net to get a copy of this message | ||
SQL Server 2000 may be listening on port 2433, instead of the default port 1433 that the MSSQL
client libraries and old MSSQL servers use. In this case, you might end up with mssql_connect()
using port 1433 and SQL Server denying the connection.
If you are unable to connect, you can start by verifying the port SQL Server is listening on. From
the database server, run Start->Program Files->Microsoft SQL Server->Server Network
Utility. Select TCP/IP from the list of protocols and press Properties... - it will say what port
the server is listening on (usually 1433 or 2433).
With SQL Server 2000 SP2 I was unable to change the default TCP/IP port on the server side. But you
can still change the default port the client libraries are using. On your PHP machine, first make
sure you have the MS SQL server Client utilities installed, then run Start->Program
Files->Microsoft SQL Server->Client Network Utility. Choose "TCP/IP" from the
Enabled protocols list and press "Properties...". Enter the port number that the server
is listening on here (2433 in my case).
Once server and client are using the same port, PHP will be able to connect properly.
--
http://www.php.net/manual/en/function.mssql-connect.php
http://master.php.net/manage/user-notes.php?action=edit+26785
http://master.php.net/manage/user-notes.php?action=delete+26785
http://master.php.net/manage/user-notes.php?action=reject+26785