CentOS PHP5 and Mcrypt

For some strange reason (i didn’t investigate) CentOS 5 does not come with a pre build mcrypt extension for PHP. This is pretty weird if you ask me. And building this extension from source is no option for me. There are way to much dependencies missing. And i don’t really like installing *dev packages on my server. So how to fix this?

Luckily there are some rpm files floating around the net. So i just used rpmfind to find a fedora 5.2.6 version of the mcrypt extension. After downloading it’s a one line command to install. And a apache reboot to get it working.

Constantin was so nice to comment on the fact that the mcrypt library needs to be installed before installing the mcrypt PHP extension.

  • $ wget ftp://rpmfind.net/linux/fedora/updates/7/i386/php-mcrypt-5.2.6-2.fc7.i386.rpm
  • $ rpm -ivh –nodeps php-mcrypt-5.2.6-2.fc7.i386.rpm
  • $ /etc/init.d/http restart
comments powered by Disqus