PHP on Linux even MSSQL, using UNIXODBC + FreeTDS
Installation steps:
Installing UNIXODBC
Yum Install UnixODBC
Yum Install Unixodbc-devel
Installing 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
Database = 7230
Test connection
Isql-v Ppcmssql 7230 7230
CentOS + php+ Unixodbc + freetds Configuration