We move one of our sites to a new server with Centos 7. We make the settings, the PHP 7 is working but we can't run libraries for MSSQL connection. For now we do this:
yum install freetds
yum install php-mssql
FreeTDS appear that was installed, but: not working, in phpinfo() does not appear and in Easyapache 4 > PHP Extensions does not appear.
Thanks!
1) Download FreeTDS
wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
2) Extract
tar zfvx freetds-stable.tgz
3) Configure $ Make
cd freetds-*; ./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib --enable-dbmfix --with-gnu-ld; make ; make install
4) Add the compile flag for freetds to /var/cpanel/easy/apache/rawopts/all_php5 In this version, PHP 5 is the focus hence that specific file. Add the following:
echo "--with-mssql=/usr/local/freetds" >> /var/cpanel/easy/apache/rawopts/all_php5
5) Touch the following files as these are what are checked for by PHP. The following error will result if they are not in place. configure: error: Directory /usr/local/freetds is not a FreeTDS installation directory. Here are the files to create for PHP's conditional check:
touch /usr/local/freetds/lib/libtds.a
touch /usr/local/freetds/include/tds.h
6) Now run Easy Apache and make sure that Mysql, Mysql of the system, amd Mysqli are all selected.
7) Simply build.
/scripts/easyapache
I found this - all above - here:
https://forums.cpanel.net/threads/definitive-freetds-installation-instructions.88561/
http://pointbeing.net/weblog/2010/05/successful-microsoft-sql-server-support-for-php-on-linux.html