Centos + php + unixodbc + FreeTDS configure MSSQL for php on linux and use unixodbc + FreeTDS
Installation steps:
Install unixODBC
Yum install unixODBC
Yum install unixODBC-devel
Install FreeTDS
./Configure -- with-tdsver = 8.0 -- prefix =/usr/local/freetds -- enable-msdblib -- with-gnu-ld -- enable-shared -- enable-static
Make
Make install
Vi/usr/local/freetds/etc/freetds. conf
[PPCSERVER]
Host = 192.168.2.120
Port = 1433
Tds version = 8.0
Client charset = UTF-8
Test connection
/Usr/local/freetds/bin/tsql-s ppcmssql-U 7230-P 7230
Vi/etc/odbcinst. ini
[FREETDS]
Description = ODBC of FreeTDS for ms SQL 2000
Driver =/usr/local/freetds/lib/libtdsodbc. so
Setup =/usr/local/freetds/lib/libtds. so
FileUsage = 1
Vi/etc/odbc. ini
[ODBC Data Sources]
Ppc = ppc SQL server
[PPCMSSQL]
Driver = FREETDS
Description = ppc SQL server
Trace = No
Servername = PPCSERVER
Databases = 7230
Test connection
Isql-v PPCMSSQL 7230 7230