Lynn Thames
asked on
Help with error trying to connect to SQL Server 2008 from linux with php sql server extensions
Help!
I have a new app that we are trying to test on our dedicated linux webserver (hosted at hostgator). The app is using php ms sql server extensions that were installed by Hostgator.
We get the following error trying to run the scripts from the hostgator web server, but it works fine running locally.
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: xx.xxx.xxx.xxx,xxxxx in /home/sp/public_html/formd emo/101for ms.ajax.ph p on line 11
array(4) { ["type"]=> int(2) ["message"]=> string(128) "mssql_connect() [function.mssql-connect]: Unable to connect to server: xx.xxx.xxx.xxx,xxxxx" ["file"]=> string(47) "/home/sp/public_html/form demo/101fo rms.ajax.p hp" ["line"]=> int(11) } connection failed
Can anyone help me troubleshoot this?
Thanks!
I have a new app that we are trying to test on our dedicated linux webserver (hosted at hostgator). The app is using php ms sql server extensions that were installed by Hostgator.
We get the following error trying to run the scripts from the hostgator web server, but it works fine running locally.
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: xx.xxx.xxx.xxx,xxxxx in /home/sp/public_html/formd
array(4) { ["type"]=> int(2) ["message"]=> string(128) "mssql_connect() [function.mssql-connect]: Unable to connect to server: xx.xxx.xxx.xxx,xxxxx" ["file"]=> string(47) "/home/sp/public_html/form
Can anyone help me troubleshoot this?
Thanks!
Find out if the mssql server allows for external connections. It seems like the mssql server is blocking the requests from your web server. It could be a firewall issue, where you need to open the port on which the database server listens (even through that could be a security risk).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The ms sql server already works with external connections on a different database (same sql server instance . . .sqlexpress). But these are VB applications run from remote desktops. And they work from any IP address anywhere.
And the port is opened on the router firewall.
And the port is opened on the router firewall.
ASKER
Ray, I have a programmer working through that very document already. Hostgator provided it to us.
And I have also found hostgator support to be great . . . but in this case the rep I was working with is as lost as I am!
So I am hoping to find an expert that can either pave the way or knows the solution!
And I have also found hostgator support to be great . . . but in this case the rep I was working with is as lost as I am!
So I am hoping to find an expert that can either pave the way or knows the solution!
In this question https://www.experts-exchange.com/questions/27424576/Looking-for-examples-on-connecting-to-MS-SQL-Server-with-freetds-in-C.html , the asker finally figured out how to configure freeTDS and make it work on Linux to connect to Microsoft SQL.