Skip to Content.
Sympa Menu

freetds - Re: FreeTDS with PHP on OSX?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT speakeasy.org>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: FreeTDS with PHP on OSX?
  • Date: Sun, 24 Jun 2001 00:52:57 +0000


Hi Gabriel,

gricard AT mac.com wrote:

> I've got a system running OSX. I managed to get FreeTDS compiled
> and installed and then compiled PHP 4.0.5 with the FreeTDS libraries. I
> cannot seem to get it to connect to the DB. I need to connect to an MS
> SQL Server running 6.5. It appeared from the documentation that I should
> use version 4.2, which I am. My interfaces entry looks like this:
>
> mssqldb
> query tcp tds4.2 a.b.c.d 1433
> master tcp tds4.2 a.b.c.d 1433

Your configuration is known to work; it's almost certainly a configuration
issue.
Yes, 4.2 is the right protocol version for SQL Server 6.5.

Your query line should be:
query tcp 4.2 a.b.c.d 1433

(per the docs, not the sample file)

Also, "a.b.c.d" should be either the data server's ip address or its
hostname. When
you're telling PHP which data server to use, you provide the symbolic name
("mssqldb"
in your case). FreeTDS will find the symbolic name in the interfaces file and
establish a connection to the machine designated by "a.b.c.d".

You'll want to make sure you can reach "a.b.c.d" with ping, and you should be
able to
connect to the port -- if the server's up and listening -- with "telnet
a.b.c.d
1433". I don't remember offhand what the default port is for 6.5, but you'll
want to
be sure of that, too.

Welcome to FreeTDS. Let us know how it goes.

--jkl

P.S. The advice to try Sqsh if you need to troubleshoot your connection is
well
founded, but I wonder: Does it install/run in OSX?





Archive powered by MHonArc 2.6.24.

Top of Page