This guide shows you how to install PHP 5.3 on CentOS if you already have PHP 5.1 installed on then you need to remove it before install installing php53 via YUM.
To list all PHP RPM’s (packages) on CentOS use:
This should list all RPM’s containing the text php on your system (so you know what packages to remove).
Remove the existing PHP RPM’s, now this is going to vary from install to install, however the following remove command should remove all PHP packages from most CentOS installs.
Then install PHP 5.3 with:
You will need to restart Apache for it to use php 5.3.