php-mcrypt for PHP 5.4

7 posts / 0 new
Last post
#1 Mon, 08/18/2014 - 10:01
eddieb

php-mcrypt for PHP 5.4

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!

Mon, 08/18/2014 - 10:32
eddieb

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

Mon, 08/18/2014 - 11:33
ErikNL

Hi Eddie,

The following info fixed this issue for me:

http://forums.famillecollet.com/viewtopic.php?id=1871

Mon, 08/18/2014 - 15:00 (Reply to #3)
eddieb

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.

Tue, 03/31/2015 - 06:59
eddieb

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!

Thu, 12/25/2014 - 11:14
cagriaksu

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

Mon, 03/30/2015 - 21:51 (Reply to #6)
JohnWolgamot

Very easy to follow your additional instructions.

And thanks to eddieb too.

John Wolgamot

Topic locked