Monday, May 24, 2010

How to Update PHP

For most, using RPM as a package manager, If you upgrade/install php you will see a lot of dependecy errors and all, which is quite annoying. So plese Follow the below steps to make it easy.

I. If PHP is installed in your system then remove it. Put this in a script or from shell.
# for i in `rpm -qa|grep -i php`; do rpm -e $i --nodeps; done

II. rpm -ivh php52-common-5.2.13-1.el5.x86_64.rpm php52-cli-5.2.13-1.el5.x86_64.rpm php52-5.2.13-1.el5.x86_64.rpm

Now if you do "php -v" you can see the version of PHP.

Hope it will be helpful to all of you.

No comments:

Post a Comment