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
https://forums.phpfreaks.com/topic/284339-mssql_connect-woes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.