Re: PHP connecting to MSSQL
| From: | Sascha Meyer | Date: | Tue, 31 Mar 2009 14:33:07 +0000 |
| Subject: | Re: PHP connecting to MSSQL | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-29238@lists.php.net to get a copy of this message | ||
Hi Alf,
I just installed MSDE on my PC and I could connect locally with a trusted connection, using shared memory Net-Library. When connecting using hostname and port, the connection failed, because the server was not listening on port 1433.
this will resolve your problem: if you install MSDE without giving the parameter "DISABLENETWORKPROTOCOLS=0", only local access with the Net-Library will be available. You can reactive the network protocols through the client tool "svrnetcn" located in your MSSQL server's "binn" directory and enabling "TCP/IP" (you can also define the used port with this utiliy). Don't forget to restart your SQL Server service!
If you now run "netstat -an", you will find your server listening on port 1433.
Regards, Sascha
Alf Stockton schrieb:
Sascha Meyer wrote:Hi Alf, your local SQL Server is probably listening on another port ... perhaps you could try the following in a DOS prompt: netstat and netstat -n The first should give you all open local ports with descriptions to the port if a default port was used. The second will give you all open ports with port numbers instead of protocol names. This could help you check if your server is listening on another port.The results of your above was/is:- C:\Documents and Settings\alf>netstat Active ConnectionsProto Local Address Foreign Address State TCP k9pad:1032 k9pad:1522 ESTABLISHED TCP k9pad:1522 k9pad:1032 ESTABLISHED TCP k9pad:1045 localhost:27015 ESTABLISHED TCP k9pad:27015 localhost:1045 ESTABLISHEDC:\Documents and Settings\alf>netstat -n Active ConnectionsProto Local Address Foreign Address State TCP 10.0.0.3:1032 10.0.0.3:1522 ESTABLISHED TCP 10.0.0.3:1522 10.0.0.3:1032 ESTABLISHED TCP 127.0.0.1:1045 127.0.0.1:27015 ESTABLISHED TCP 127.0.0.1:27015 127.0.0.1:1045 ESTABLISHEDbut I do not see mssql in either of those results?