Installing mcrypt for PHP 5.3 on CentOS 5.6
With CentOS 5.6 Red Hat added an optional php53 package for those that need a PHP version later than 5.1.6. After removing the php packages and installing php53 you will probably notice that the mcrypt extension is missing. With a few steps we can compile and install this extension.
yum install php53-devel libmcrypt-devel gcc
cd
wget http://vault.centos.org/5.6/updates/SRPMS/php53-5.3.3-1.el5_6.1.src.rpm
mkdir /usr/src/redhat
rpm -i php53-5.3.3-1.el5_6.1.src.rpm
cd /usr/src/redhat/SOURCES
bunzip2 php-5.3.3.tar.bz2
tar xf php-5.3.3.tar
cd php-5.3.3/ext/mcrypt
phpize
aclocal
./configure
make
make install
echo "extension=mcrypt.so" > /etc/php.d/mcrypt.ini
service httpd restart
Thank you very much. This worked very well for me. Perfect!!!
This was easy!! So much other crap on the interweb that complicated this situation. One guy led me to a centos bug page saying that it cannot be fixed. Thanks!
Works great. Thank you so much.
That really simplified the last few hours of Googling. Nice and concise, worked like a charm. Thanks so much.
I did this and it worked. The question I have is if php updates or there is a vulnerability in mcrypt do you get patch or are you stuck to 5.3.3-1?