[freetds] Re: PHP & FreeTDS

Walls Rob W Contr 75 CS/SCBS Rob.Walls at HILL.af.mil
Mon Aug 23 15:15:30 EDT 2004

I got the unixODBC dev rpm and used
./configure --with-tdsver=7.0 --with-unixodbc=/usr/lib
(RedHat's unixODBC RPM puts .so files in /usr/lib and puts .h files in
FreeTDS compiled and installed OK into /usr/local/lib.
Tsql works fine as before.
Using the ODBCConfig GUI tool, I set Driver to /usr/local/lib/libtdsodbc.so
And Setup to /usr/lib/libtdsS.so
Isql still does not work and gives the following error
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[ISQL]ERROR: Could not SQLConnect 

I thought isql may be looking only in /usr/lib, so I tried a make clean and
./configure --with-tdsver=7.0 --with-unixodbc=/usr/lib --prefix=/usr
To put all the include and lib stuff directly into /usr/lib and /usr/include
Which it did, but now isql gives the following error:
[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/libtdsodbc.a' :
/usr/lib/libtdsodbc.a: invalid ELF header
[ISQL]ERROR: Could not SQLConnect

So, I moved the /usr/lib files back as they were from an identical system. 
BTW: PHP gives the same errors as isql in both instances above. PHP is
ultimately what I'll use to connect. Apparently PHP and isql are linking to
the same place.

Any ideas? 

Rob Walls 
Hill AFB, UT 84056 
PH (801) 777-2230 
DSN 777-2230 

-----Original Message-----
From: freetds-bounces at lists.ibiblio.org
[mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of Petar Djekic
Sent: Saturday, August 21, 2004 5:03 AM
To: FreeTDS Development Group
Subject: Re: [freetds] Re: PHP & FreeTDS

ok thanx for all the replies (esp the mail how to use tsql). im now using
the tsql tool to access the MSSQL Server from PHP, cuz i couldnt get PHP to
recomplie properly (not freetds related).
i know its not very elegant (and slow) but it works...

FreeTDS mailing list
FreeTDS at lists.ibiblio.org

More information about the FreeTDS mailing list