Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Help with error trying to connect to SQL Server 2008 from linux with php sql server extensions

Posted on 2012-04-12
5
Medium Priority
?
908 Views
Last Modified: 2012-04-15
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/formdemo/101forms.ajax.php 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/formdemo/101forms.ajax.php" ["line"]=> int(11) } connection failed

Can anyone help me troubleshoot this?

Thanks!
0
Comment
Question by:lthames
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Expert Comment

by:chrisroch
ID: 37837760
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).
0
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 total points
ID: 37837802
Just a thought... Have you read the user-contributed notes here?  Some might be helpful.  I've also found HostGator telephone support to be excellent.
http://us3.php.net/manual/en/function.mssql-connect.php
0
 

Author Comment

by:lthames
ID: 37837820
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.
0
 

Author Comment

by:lthames
ID: 37837823
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!
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 37847836
In this question http://www.experts-exchange.com/Programming/Languages/C/Q_27424576.html , the asker finally figured out how to configure freeTDS and make it work on Linux to connect to Microsoft SQL.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question