[freetds] Linux/MSSQL connect
Daniel Fazekas
fdsubs at t-online.hu
Mon Nov 13 14:53:35 EST 2006
On Nov 13, 2006, at 20:28, Clark, Harry wrote:
>> I'm trying to reach MSSQL 2000 from Linux (FC5). I have FreeTDS
>> and unixODBC installed and can connect with tsql. isql gives
> Fixed that, error on the connection info. I can execute a query
> from the cmd line on the Linux box. I want to use this in PHP. Do I
> really need to rebuild PHP with the --with-mssql option?
If by "this," you mean via unixODBC, then no -- in that case, you'd
use the ODBC php extension instead.
The mssql extension is for interfacing FreeTDS directly, without
going through unixODBC as a middleman.
Even then, it should not be necessary to rebuild the whole of php.
> At minimum I need to specify extension=mssql.so in php.ini and find
> a current mssql.so;
You just need to grab the source code of your system's PHP. Then go
into the subdirectory of the extension you wish to build:
cd ext/mssql
phpize && ./configure && make
Finally, as root:
make install
and there's your mssql.so if everything went correctly.
--
fds
More information about the FreeTDS
mailing list