Jun 3, 2008

MSSQL + PHP in Ubuntu 8.04

Following comments to this post, I got MS SQL working with PHP.

$ apt-get install freetds-dev tdsodbc php5-sybase
$ nano /etc/odbcinst.ini
Description = FreeTDS 0.61-5 Deb
Driver = /usr/lib/odbc/libtdsodbc.so
Setup = /usr/lib/odbc/libtdsS.so
FileUsage = 1
CPTimeout = 5
CPReuse = 5

$ nano /etc/odbc.ini
Description = Products on The MSSQL Server
Driver = FreeTDS
Servername = FSData
Database = Products
Port = 1433


Aerik said...

So, is that all you had to do? Or did you have to compile from sources too?


sp said...

No, I didn't compile anything.

Warren said...

Will this work woth mssql() functions ?

sp said...

Yes, working mssql_* functions is the purpose of this whole configuration procedure.