Skip to Content.
Sympa Menu

freetds - RE: [freetds] Re: connecting to remote MS Sql 2k server from linux PHP

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Re: connecting to remote MS Sql 2k server from linux PHP
  • Date: Mon, 1 Nov 2004 13:49:54 -0500

> From: Rick D. Conner
> Sent: Monday, November 01, 2004 10:51 AM
>
> Ok, I did add an entry to the .freetds.conf file named [SYBASE] and
set it
> up and it now finds it and finds the right ip etc... But it still
doesn't
> connect. I get the following in tds.log.txt:
>
> Starting log file for FreeTDS 0.62.3
> on 2004-11-01 10:45:02 with debug level 99.
> iconv to convert client-side data to the "ISO-8859-1" character set
> 10:45:02.516082 tds_iconv_info_init: converting
"ISO-8859-1"->"UCS-2LE"
> 10:45:02.516113 Connecting to 66.208.184.170 port 1433, TDS 4.2.
> 10:45:07.511429 tds_client_msg: #20009: "Server is unavailable or does
not
> exist.". Connection state is now 0.
>
> So I guess what I need to know now, is what are the "network" items
that
> need checked and any settings to ensure is setup at both ends. I've
got the
> port opened on the router, and the webhost said they did the same. The
> documentation doesn't include much about this at all, and I don't have
> command line access...

Rick,

It's very difficult to help you, because you don't have a shell account
on the web server. I could offer various tests, but you'd have to
figure out how to implement them via PHP or something, which I would
think would be tedious at best.

Someone who does have access to a command line should verify that your
webserver can connect to your dataserver. tsql should work (with TDS
7.0, btw). freetds.conf should be placed where FreeTDS will find it
when run under the account that httpd uses.

I'm still puzzled by the fact that it's searching for "SYBASE" in the
first place. That's the first indication that something's amiss. If
you don't control the PHP installation, you need to talk to the guy who
does, because he needs to investigate why the strings in:

$conn = "MyServer2k";
$username = "Website";
$password = "bwelch";
$msconnect=mssql_connect("$conn","$username","$password");

are not delivered to the dbopen() function. In a working PHP setup,
your TDSDUMPCONFIG log would show FreeTDS searching for "MyServer2k".

--jkl



-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the original
message. Please note that we do not accept account orders and/or instructions
by e-mail, and therefore will not be responsible for carrying out such orders
and/or instructions.
If you, as the intended recipient of this message, the purpose of which is to
inform and update our clients, prospects and consultants of developments
relating to our services and products, would not like to receive further
e-mail correspondence from the sender, please "reply" to the sender
indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New York,
NY 10105.






Archive powered by MHonArc 2.6.24.

Top of Page