apache Databases linux MSSQL OS php programming Quick Tips servers zend

Adding mssql capability to PHP5 on CentOS

I had a need to connect to MSSQL using PHP version 5 from a CentOS 5 server. To do this I needed FreeTDS and the module mssql in PHP. After a diligent search I found that there was no quick and easy way to install the mssql module, like “up2date install php-gd” to get GD to work from PHP.

I found a few places that had ideas and hints to make this work, but finally used the directions I found at (slightly altered to fit my means) and will duplicate here so I can easily find it later.

At first I thought I needed to recompile PHP, but as it turned out I only needed to pre-compile it so that I could fetch the, and then manually edit the php.ini to use it.