Something Different In Linux

Home » PHP » Enable mssql support on Linux server

Enable mssql support on Linux server

Posted by Rishikesh Vispute Categories: PHP, Uncategorized

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

cd /usr/local/src


tar  -xzvf php-5.3.2.tar.bz2

cd  php-5.3.2/ext/mssql

./configure –with-mssql
make install

Next look for the 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:

Save the php.ini and restart Apache:

/etc/init.d/httpd restart



8 Responses so far.

  1. Thanks for the best comments

  2. What a great resource!

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

  4. 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?

  5. 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.

  6. 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. 🙂

Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...