Web Development and stuff…

CentOS PHP5 and mcrypt

with 2 comments

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

del.icio.us Digg DZone reddit SlashDot StumbleUpon Technorati

Written by Thijs Lensselink

March 17th, 2009 at 10:40 am

Posted in Code, PHP, Tech

Tagged with , , ,

2 Responses to 'CentOS PHP5 and mcrypt'

Subscribe to comments with RSS or TrackBack to 'CentOS PHP5 and mcrypt'.

  1. very nice info; works fine in CentOS 5;

    one more thought, you need “libmcrypt” to work, otherwise mcrypt module will not load (even if you set it up in php.ini)

    yum install libmcrypt

    Constantin

    25 Aug 09 at 10:35

  2. You are correct. I’ve added an extra notice :)

    Thijs Lensselink

    25 Aug 09 at 13:49

Leave a Reply