These PHP functions allow you to access MS SQL Server database by using freetds.

This tutorial will work with php 5.3.29 - php 5.6.40 only for php 7.x use sqlsrv which is already in php options.

To build MSSQL with php 5.6/5.x.x just follow this steps :

Run this commands one by one (this will install freetds and its header files) :

yum install -y freetds freetds-devel freetds-libs
ln -s /usr/lib64/libsybdb.so.5.1.0 /usr/lib/libsybdb.so
ln -s /usr/lib64/libsybdb.so.5.1.0 /usr/lib64/libsybdb.so

Now go to php selector/php-fpm selector and hit "Reset options" under php 5.6 (or 5.x.x) and add this to "Manual options" config then save it :

[mssql]
default=0
option="--with-mssql"
info-file=config-path.txt

Next step is to choose the mssql option with your desired php ext options from "Select Options" and hit save custom config go "Back" and click on "Start Compiler (build & install)" wait for the php build and check php info.