?
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
?
895 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 83

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

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Viewers will learn how the fundamental information of how to create a table.
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.

800 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