Upgrade PHP 4 to PHP 5 on VPS

From Lunarpages Web Hosting Wiki

Please use the following steps to get PHP upgrade to version 5:

1. Login to the server as root via ssh 2. Install yum using the following commands:

rpm -ihv --nodeps
rpm -ihv --nodeps
rpm -ihv --nodeps

2. Then add Atomic repository that contains PHP for Linux Plesk servers and update PHP and MySQL:

rpm -ivh
rpm --nodeps -e php-domxml
yum update php*
yum update mysql*
yum install php-xml

3. Remove yum if you are done with software installations using "yum upgrade" or installing other packages can break the VPS:

rpm -e `rpm -aq | grep yum`