Incorporate Mcrypt support in PHP without recompiling each update

Q I administer a Red Hat Enterprise Linux 4 server that is used to host mail and web for ten production domains. I use all stock RPMs to avoid complications with updates coming in through our systems management platform, Red Hat Network (RHN). Recently I've been asked to recompile PHP with Mcrypt support, but doing so would mean recompiling PHP every time Red Hat releases updates on these RPMs. Is there any way to incorporate Mcrypt support in PHP without having to constantly rebuild my own RPMs or add 'php*' to up2date's pkgSkipList?

A You're in luck! I recently came across a project called PHPRPMs (, which provides PHP RPMs for little used or non-GPL extensions. The project's RPMs are currently available for Fedora, RHEL 3, and RHEL 4 (i386 and x86_64). Once you've downloaded the appropriate php-mcrypt RPM for RHEL 4, simply install the package using the rpm command. A restart of the httpd service would be normally be required, but the installation of the php-mcrypt RPM will do this for you. If you don't have libmcrypt installed (libmcrypt is required to use php-mcrypt), you can download the latest RPM for RHEL 4 from This way, instead of having to forego updates via RHN or having to rebuild PHP RPMs when new updates are released by Red Hat, you can simply check these two sites every once in a while for libmcrypt and php-mcrypt RPM updates.

Follow us on or Twitter

Username:   Password:
Create Account | About TuxRadar