#cd /usr/local/directadmin/customapache
#wget http://files.directadmin.com/services/customapache/php-5.2.4.tar.gz
#nano build
change PHP_VER=4.4.7 to PHP_VER=5.2.4
#yum install -y libc-client libc-client-devel freetype freetype-devel libxml2-devel bzip2-devel shared-mime-info
#nano configure.php_ap2
replace all
***************************************************
#!/bin/sh
./configure \
--prefix=/usr/local/php5 \
--enable-force-cgi-redirect \
--enable-fastcgi \
--with-config-file-path=/usr/local/etc/php5/cgi \
--with-apxs2 \
--with-curl \
--with-curl-dir=/usr/local/lib \
--with-gd \
--with-gd-dir=/usr/local/lib \
--enable-gd-native-ttf \
--with-freetype-dir \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-png-dir=/usr/local/bin \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xml \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--enable-zip \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars \
--enable-mbstring \
--enable-memory-limit \
--with-iconv \
--enable-exif \
--with-bz2 \
--with-dom \
--with-imap \
--with-imap-ssl
***************************************************
#./build clean
#./build php_ap2 y
#nano /etc/httpd/conf/httpd.conf
************************************************
Comment or delete this line
#LoadModule php4_module /usr/lib/apache/libphp4.so
************************************************
#mkdir -p /usr/local/etc/php5/cgi
#cp /etc/php.ini /usr/local/etc/php5/cgi/
#service httpd restart
Install Zend Optimizer
#./build zend
Restart service
#service httpd restart