Skip to Content.
Sympa Menu

freetds - [freetds] FreeTDS + php-sybase_ct on Debian Sarge

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "John Fleming" <jfleming AT donet.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] FreeTDS + php-sybase_ct on Debian Sarge
  • Date: Wed, 14 Sep 2005 08:29:27 -0400

Greetings,

I've recently brought up a new cluster of Debian Sarge machines,
load-balanced with LVS (and Keepalived), to replace an aging cluster
based (loosely) on RH 7.3 with custom built binaries. I'm trying as
hard as I can to stick with stock Debian packages because there are so
many servers to manage, compiling everything myself, though I like it in
theory, has become unmanageable. I need to be able to apply security
updates quickly across the board as easily as possible.

That brings us to: Several sites that run on this cluster need to
communicate with a Sybase ASE 11.9.2.6 server running on another Linux
server. On the old cluster, we compiled PHP against the Sybase
libraries and that has always worked fine.

On the new cluster, I installed the Debian php4-sybase which uses
FreeTDS. The first problem I encountered was simply that Sybase
connections weren't working at all. I quickly realized I had to put
entries in freetds.conf which at first seemed to solve my problem.
Except that now about 1/4 hits to the page resulted in a message like
this:

Warning: sybase_connect(): Sybase: Client message: Login incorrect.
(severity 78) in /path/named/hidden/database.phtml on line 25

Well, happily, I figured out that setting "tds version" to 5.0 in
freetds.conf resolved that issue and this particular site and most other
ones began to work perfectly.

Then, another site was brought to my attention. On loading it, the
following error would come up instead of the page:

Cannot find the requested character set in Syscharsets: name =
'ANSI_X3.4-1968'. No conversions will be done.

This confused me at first, but I was able to make things better by
creating a separate entry in the freetds.conf just for this site to use
to connect to
the Sybase server, and specified "tds version = 4.2" just for these
connections. Now the site works, again, about 1/4 of the time.

If I use sqsh from the command line using either login credentials (the
site that was fixed by setting to 5.0 and the site that was broken by
setting to 5.0)
and tds version 5.0 gives me that ANSI_X3.4-1968 character set message.
However, that for some reason does not cause the site to fail--it works
consistently and perfectly. Setting to 4.2 never gives that message,
but 25% of the time the connection fails.

I am definitely not a Sybase wizard, but I'm sharp enough that if anyone
can point me in the right direction I could get this problem solved. I
want desperately to avoid having to compile my own PHP and Apache for
reasons stated above, but if I have to in order to get all these sites
to work consistently, that is an option.

Thanks,
John




Archive powered by MHonArc 2.6.24.

Top of Page