ADDING Microsoft SQL Server SUPPORT FOR PHP on RHEL4

one of our programmer needs to access microsoft sql server from our php server, so i have to reinstall php to add this support (php-mssql), here’s what i do :

1. download freetds from

ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz

2. build and install freetds :

$ tar xzfv freetds-stable.tgz
$ ls
$ cd freetds-0.64
$ ./configure –prefix=/usr/local/freetds –enable-msdblib
$ make
$ su –
$ make install
$make clean

3. build and install php

$ tar xjfv php-5.2.4.tar.bz2
$ cd php-5.2.4
$ ./configure –with-apxs2=/usr/local/apache2/bin/apxs –enable-magic-quotes –with-openssl –with-zlib –with-bz2 –enable-ftp –with-gd –enable-mbstring –with-mysql=/usr/include/mysql –with-mysqli=/usr/bin/mysql_config –with-freetype-dir –with-t1lib –with-jpeg-dir –with-mssql=/usr/local/freetds
$ make
$ su –
$ make install
$ make clean

4. check httpd.conf to make sure php5 module not loaded twice. then restart apache.

enabling or disabling spamassassin or clamav

using qmail, qmail-scanner, spamassassin, clamav. sometimes when clamav causing error and needs update, the entire mail delivery will fail. while updating clamav, we can tell qmail-scanner not to use it so the mail delivery will continue without clamav. to enable or disable clamav or spamassassin find these lines in /var/qmail/bin/qmail-scanner-queue.pl :

my @scanners_installed=(“clamdscan_scanner”,”spamassassin”,”perlscan_scanner”);
my @scanners_default=(“clamdscan_scanner”,”spamassassin”,”perlscan_scanner”);

to enable only spamassassin, turn it to be :

my @scanners_installed=(“spamassassin”);
my @scanners_default=(“spamassassin”);

to enable only clamav, turn it to be :

my @scanners_installed=(“clamdscan_scanner“);
my @scanners_default=(“
clamdscan_scanner“);


save and then do this :

$ setuidgid qscand /var/qmail/bin/qmail-scanner-queue.pl -g
$ setuidgid qscand /var/qmail/bin/qmail-scanner-queue.pl -z