Yes, as I recall getting a newer version of php on CentOs 5.x was mighty painful.
Basically there is a php53 package in the updates repos;
# cat /etc/redhat-release
CentOS release 5.8 (Final)
# repoquery -i php53
Name : php53
Version : 5.3.3
Release : 7.el5_8
Repository : updates
but if you run something like this;
# yum provides php
php-5.1.6-32.el5.x86_64 : The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
php-5.1.6-34.el5_8.x86_64 : The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
you will see that php53
package does not actually provide php, which means that installing it will break any packages that depend on php
, despite there being a php on the system.
In the end I used a shim rpm that just contained a single provides line, which I found somewhere on the web because all my php requirements were simple.
The alternatives are as @c2h5oh mentioned, to use a 3rd party re-packaged version, (or to upgrade to Centos 6.2 :-< ).
You can see what replacing all the php
with php53
will break with the following command;
# rpm --whatrequires -V php
Unsatisfied dependencies for pastebin-0.60-4.el5.noarch: php
You can see from the output of that last command, that in my case I wasn't using any packages that require php
that were important, so I just did used --nodeps
to force remove all the php.