Plesk 8 - Upgrading To Php 5.2.1

To upgrade php on a 'Plesk 8 Redhat / Enterprise Linux - OS / ES 4.0' server you will need to take the following steps:

cd /root
mkdir theplanet
cd theplanet
wget http://3es.atomicrocketturtle.com/packages/php/php-5.2.1-3.art.src.rpm
wget http://internap.dl.sourceforge.net/sourceforge/mhash/mhash-0.9.9.tar.gz
wget http://3es.atomicrocketturtle.com/packages/sqlite/sqlite-3.1.2-3.art.src.rpm
wget http://3es.atomicrocketturtle.com/packages/pcre/pcre-7.0-2.art.src.rpm

rpmbuild --rebuild sqlite-3.1.2-3.art.src.rpm
rpmbuild --rebuild pcre-7.0-2.art.src.rpm
tar -zxvf mhash-0.9.9.tar.gz
rpm -Uvh /usr/src/redhat/RPMS/i386/pcre* usr/src/redhat/RPMS/i386/sqlite*
cd mhash-0.9.9
./configure
make && make install

rpm -i php-5.2.1-3.art.src.rpm
cd /usr/src/redhat/SPECS/
vi php-art.spec

Now you will need to add the following lines to the spec file:

--with-mhash \

Now to build the spec file you will need to use the following command:

rpmbuild -bb --target=i686 --define "rhel4 1" php-art.spec

Once the above has completed you will need to install the RPMS using the following command:

rpm -Uvh /usr/src/redhat/RPMS/i686/php-*

The following commands will make sure that the current version is installed and show you the modules that php is now using:

php -v
php -m