These are the steps that I use to update php
- Download the source rpm from Red Hat
- rpm -Uvh php-*.src.rpm
- cd /usr/src/redhat/SPECS/
- edit php.spec to include "--with-mcrypt "
- rpmbuild -ba php.spec
- cd /usr/src/redhat/RPMS/i386
- rpm -Uvh php*.rpm
- restart apache
It would great if yum could be updated so that it would compare the spec file for what was installed to the update. If the spec files is different, yum would download the source rpm, make the changes to the spec file, and then build and install the source rpm.