views:

22

answers:

1

I'm am getting a named pipes error when I try to connect to ms sql server 2008 using a php script running an sqlsrv_connect command. In the ms sql configuration stuff tcp/ip, shared memory, and named pipes are all enabled. Everything is stored on the same server, the database, and the php script so I'm just using a "(local)" for the server name. I'm running php 5.3.2, IIS and ms sql 2008.

Does any one have any solutions or explanations for why I'm getting this error?

A: 

How I might go about debugging this:

  • be explicit with the server name, see what happens
  • disable network libraries that aren't needed. For a local connection, you can connect via shared memory
  • check both sides of the connection for network libraries. Both the client and the server must be configured to make use of the chosen network library. EVEN if they are on the same box.
  • Google
  • Google

From looking at the second link, I would have to guess that sql server isn't listening on the pipe your app is trying to connect with. Instead of trying to figure that out, back to disabling network libraries if I was you.

MaasSql