Jump to content

mssql_connect Woes


mkswanson

Recommended Posts

I'm having problems with a simple mssql_connect to a remote server.

$ngLink = mssql_connect($ngServer, $ngLogin, $ngPassword);

if ( !$ngLink ) {
    die('Connection to database failed!');
}

If I point the server to a local instance of SQL 2008, the connection is successful.

 

If I point the server to a remote instance of SQL 2008, I get a connection failed message.  

 

Both the remote and local PCs are Win2K8 with SQL 2008 standard.

 

I have successfully connected to the remote instance using SQL management studio from my web server, so this does not appear to be a problem with the firewall or blocking based on IP.  I have also successfully connected to the remote SQL instance from my dev box, through management studio and PhpStorm.

 

I have enabled TCP/IP and named pipes in SQL configuration.

 

I have tried capturing the last PHP error, which is a generic connection failed error, as well as the last MSSQL error, which is null since a connection isn't actually happening so MSSQL isn't generating an error.

 

I have reviewed event viewer logs as well as other logs, and not been able to find anything that points me to the right direction.

 

Any suggestions on where I can begin to look to troubleshoot?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.