Discussion:
[freetds] what are the best build-options for BOTH mssql AND sybase connectivity in same php module
Knut Behrends
2013-05-31 10:58:36 UTC
Permalink
Maybe this isn't the right place to ask, because it's php-specific in a
way, but I'll ask anyway.

I need to run a PHP-based CMS (mysql-based) that makes connections to
two external RDBMs , Sybase ASE 12.5 and MSSQL 2012.

In the web server, the php 5.2.17 that I've been using for a few years
had the native client sybase built-int --sybase-ct build option
/opt/sybase/OCS-15_0 . That works well. MSSQL support is a new
requirement to me.

Can I run a "native client" for sybase, and a freetds-based client for
MSSQL in the same php .so module? Is that even possible?

or should both clients better be freetds based?

What about iconv build option for freetds and php?

What is best to put in freetds.conf and what are the protocol versions
options to use these days?

I think there is much misinformation, or deprecated information, to be
found on the web about this.

The most complicated data type that we have to store in both MSSQL and
Sybase is longer text strings. We do not use more complicated data types
like java classes or blobs, use weird character sets and collations.

BEst ragards, Knut Behrends
--
____________________________________________________________________________

Knut Behrends
____________________________________________________________________________
James K. Lowden
2013-06-03 22:57:36 UTC
Permalink
On Fri, 31 May 2013 12:58:36 +0200
Post by Knut Behrends
In the web server, the php 5.2.17 that I've been using for a few years
had the native client sybase built-int --sybase-ct build option
/opt/sybase/OCS-15_0 . That works well. MSSQL support is a new
requirement to me.
Can I run a "native client" for sybase, and a freetds-based client for
MSSQL in the same php .so module? Is that even possible?
This is too much of a PHP question for me to answer definitively. I
don't know how PHP segregates its modules. If it simply executes
dlopen(), the answer boils down to library symbols.

You can use Sybase's library and FreeTDS's library as long as they
don't provide the same symbols. You're safe, for instance, to load
Sybase's ct-lib in one module and FreeTDS's db-lib (or ODBC) in
another. But loading two incompatible versions of ct-lib is begging
for trouble even if it accidentally works.

HTH.

--jkl

Loading...