I'm using php-4.0.4pl1 and freetds-0.51 on a SuSE 7.0 system, and it works
run configure in freetds with the following options
./configure --with-tdsver=4.2 --enable-msdblib --enable-dbmfix --with-gnu-ld --enable-shared --enable-static
(read INSTALL for tdsver!)
compile and install
you have to edit "php_sybase_db.c" in
php-4.0.4pl1/ext/sybase and change all "dbopen" calls to "tdsdbopen" ( rows 382, 418, 465 )
now run configure in the php source directory:
./configure --enable-track-vars --with-apxs --with-sybase=/usr/local/freetds ....
compile and install
you must set the SYBASE environment variable and expand the lib-searchpath
for example:
SYBASE=/usr/local/freetds
and expand the library seachpath
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$SYBASE/lib
export SYBASE LD_LIBRARY_PATH
alternatively you can insert
/usr/local/freetds/lib in /etc/ld.so.conf and run ldconfig
for apache:
insert the following line in httpd.conf
SetEnv SYBASE /usr/local/freetds
finally you have to setup freetds. edit "interfaces" in
/usr/local/freetds
for example insert:
db1
query tcp tds4.2 192.168.1.1 1433
master tcp tds4.2 192.158.1.1 1433
have fun
Rene