recompiling php to use mssql extension

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
manouche
Forum Newbie
Posts: 2
Joined: Wed Jun 16, 2010 12:55 pm

recompiling php to use mssql extension

Post by manouche »

Hello all,

I have php 4.3.2.54 installed on a Redhat ES3 machine. The RPMs installed show as:

php-mysql-4.3.2-54.ent
php-4.3.2-54.ent

I am trying to write some php pages that will query a MS SQL server. I have freetds installed and can connect to the remote server and do queries. However, it seems that I don't have php compiled with support for mssql.

From PHP.net, this seems to be what I need. I did add the reference to the extension in php.ini.

The MSSQL extension is enabled by adding extension=php_mssql.dll to php.ini.

To get these functions to work, you have to compile PHP with --with-mssql[=DIR], where DIR is the FreeTDS install prefix. And FreeTDS should be compiled using --enable-msdblib.

My question is, how do I recompile php if it is installed as an RPM. I have read about rebuilding RPMs and source RPMs, but am unsure as exactly how to proceed. Some clarification would be most welcome. Thank you.
Post Reply