Enable mssql support on Linux server

How to enable mssql support on Linux server ?

Ans : You need to first compile freetds and then compile PHP with freetds support.

What is FreeTDS?

FreeTDS is a free implementation of the TDS (Tabular Data Stream) protocol that is used by Sybase and Microsoft for their database products. It implements TDS 4.2, 5.0, 7.0 and 8.0, and can communicate with any Sybase or Microsoft SQL Server.

FreeTDS comes with a low level library (the TDS layer) along with a number of APIs (Application Programming Interfaces). The APIs are DB-Lib, CT-Lib, and ODBC.

You can install freetds by using yum.

yum install freetds

After that you need to recompile the php with mssql support

check the php  version on the server and then download the same php version file for example php 5.3.2.

You can downlad php version by using this URL  http://us3.php.net/downloads.php

cd /usr/local/src

wget http://us3.php.net/get/php-5.3.2.tar.bz2/from/in.php.net/mirror

tar  -xzvf php-5.3.2.tar.bz2

cd  php-5.3.2/ext/mssql

phpize
./configure –with-mssql
make
make install

Next look for the mssql.so file and make sure it is in the module directory specified in your php.ini. Copy it to the specified location if needed.

php -i | grep php.ini

vi /usr/local/lib/php.ini

Add this line to your php.ini:

extension=mssql.so

Save the php.ini and restart Apache:

/etc/init.d/httpd restart

Done

 

8 Thoughts to “Enable mssql support on Linux server”

  1. The design for your site is a bit off in iCab. Nonetheless I like your website. I may have to install a “normal” browser just to enjoy it. 🙂

  2. Howdy. 1st I would like to say that I really like your web site, just observed it the past week but I have been reading it sometimes since then.

  3. Hey, interesting post, but WordPress screws it up on my computer. Maybe it’s the plugin you have on the site. Have you considered a different CMS?

    1. I think the wordpress is the best CMS for blog. In which contain number plug-ins.

  4. Ok,thank you,I’m going to try this too.

Leave a Comment