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

rpmbuild --rebuild
rpmbuild --rebuild
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
make && make install

rpm -i
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