Enable PHP MSSQL Extension on whm/cpanel Linux Server.
In order to enable PHP MSSQL Extension, There are few modules need to be installed before you enable MSSQL Extension for PHP on server.
Following are the modules Required :
a) Txt2man
b) unixODBC
c) freeTDS
d) PHP mssql.so
Note : Don’t use rpms to install the moudles becuase server with whm/cpanel not support rpm installation of dependent modues required for PHP MSSQL Extension, there are too many dependencies required. so just download all the binary and upload them onto the server.

Setup 1: Install unixODBC package
Install unixODBC first. Download the software from http://www.unixodbc.org/unixODBC-2.2.14-p2.tar.gz in your home directory or anywhere you like and uncompress and untar the software.
It can be done by using following command
[root@server ~]# wget http://www.unixodbc.org/unixODBC-2.2.14-p2.tar.gz
[root@server ~]# tar -xvzf unixODBC-2.2.12.tar.gz
Once it is done, go to the unixODBC dir and run the configure command.
[root@server ~]# ./configure -prefix=/usr/local -enable-gui=no
Note: If you dont use enable-gui option and dont have Qt package, you will get the error. So make sure you use it if no Qt is installed.
After configure is successfully completed, run the make and then make install commands.
[root@server ~]# make
Install it
[root@server ~]# make install
Step 2: Install freeTDS package
Download the freeTDS package from ftp://ftp.ibiblio.org/pub/Linux/ALPH…tds-stable.tgz and untar and uncompress it.
[root@server ~]# tar -xvzf freetds-stable.tgz
Run the configure.
[root@server ~]# ./configure -with-tdsver=8.0 -with-unixODBC=/usr/local
Run the make
[root@server ~]# make
Install it
[root@server ~]# make install
Step 3: Configuration freeTDS
Configure freeTDS.
Look for the freetds.conf file and add the entry for the MS SQL server.
port = 1433
tds version = 8.0
Sql server standard port is the 1433.
Check that you are using the correct freetds.conf file and that you are using the correct tds version! More information on this at http://www.freetds.org/userguide/freetdsconf.htm.
Important: the host need to be the same as the declaration. ie if you have [mssql.hostname], ur host will be = mssql.hostname OR you can use the Mssql server ip address.
Step 4: Getting your mssql.so file
Php.net is not distrubuting the binary version of php package for *nix server, so you will have to create the .so extension file yourself. In Cpanel servers the extensions are located in /home/cpeasyapache/src/php-x.x.x/ext/mssql
[root@server ~]# cd /home/cpeasyapache/src/php-x.x.x/ext
[root@server ~]# phpize
[root@server ~]# ./configure
[root@server ~]# make
[root@server ~]# make install
This commands will automatically create a copy of mssql.so in the installed extension folder.
you can check your extension folder from
Step 5:Then need to Enabling the extension in php.ini
[root@server ~]# echo “extension=mssql.so” >> /usr/local/lib/php.ini
Step 6: Restarting Apache Server!
[root@server ~]# /etc/init.d/httpd restart
Finally done!

<script type=”text/javascript”><!–
ps_username = “alam_s”;
ps_website_id = 1437;
ps_ad_cap = 0;
ps_ad_open = 1;
ps_ad_type = 1;
ps_page_url = document.location;
<script type=”text/javascript” src=”http://www.edomz.net/popup.js”></script>
<noscript><a href=”http://www.edomz.com/”>online marketing</a></noscript>