These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for php-mcrypt for PHP 5.4 on the new forum.
I followed these instructions to install PHP 5.4 alongside 5.3.3 on CentOS 6.5
https://www.virtualmin.com/documentation/web/multiplephp
How do I install php-mcrypt for php 5.4? Symlinking the current mycrypt.ini and mcrypt.so didn't work (probably because php-mcrypt is php version dependent)
How do I install php-mcrypt for php 5.4?
I have EPEL and SCL repos installed.
Thanks!
I installed the remi repo (http://mirrors.mediatemple.net/remi/). It provides php-mcrypt version 5.4.31. It should work. But I don't think it will know that the paths for php 54 (modules, ini, etc) is different from php 53, and it might overwrite mcrypt for php 53. Am I correct to assume this and if yes, is there a way around it?
Thanks
Hi Eddie,
The following info fixed this issue for me:
http://forums.famillecollet.com/viewtopic.php?id=1871
Erik, thank you for the suggestion, but that thread deals with the PHP wrapper and handler. I have PHP 5.4 working fine - I just need to install php-mcrypt for it without overwriting the existing php-mycrypt (5.3.3) install.
I used rpm2cpio to convert the only suitable .rpm file I found into a cpio archive on standard out.
$ rpm2cpio php-mcrypt-5.4.16-1.el6.x86_64.rpm | cpio -idmv
I then copied mcrypt.so and mcrypt.ini to the proper folders for the PHP 5.4 install.
Voilá, mcrypt works now!
For anybody who are trying this solution, the proper folders are:
for mcrypt.ini: /opt/rh/php54/root/etc/php.d/
for mcrypt.so: /opt/rh/php54/root/usr/lib64/php/modules/
And here is the link for downloading:
http://rpms.southbridge.ru/rhel6/php-5.4/x86_64/php-mcrypt-5.4.16-1.el6....
cheers
Very easy to follow your additional instructions.
And thanks to eddieb too.
John Wolgamot