CentOS7 php7.0.10 - mcrypt


Hoping you may be able to help me with this issue. I NEED mcrypt for a script to run but for some reason i cannot seem to get it to recognize that it is installed - i think it may be for a older version of php.

Package php-mcrypt-5.4.16-7.el7.x86_64 already installed and latest version
Nothing to do

[root@vmin ~]# php -m | grep -i mcrypt
[root@vmin ~]#

Please advise. Thanks! Scott



What error are you getting in Virtualmin indicating that mcrypt isn't enabled?

Also, did you perhaps install an alternate PHP version that you're using with this particular app?

If so, we may need to install mcrypt for that particular PHP version.

The error i am getting is from the application (wordpress app). The php version is 7.0.10. It gives me this after notifications that mcrypt is not found:

===== PHP Configuration =====

Safe Mode:              Disabled
Memory Limit:           600M
Upload Max Size:        100M
Post Max Size:          128M
Upload Max Filesize:    100M
Time Limit:             40
Max Input Vars:         1000
Display Errors:         N/A

===== PHP Extensions =====

cURL:                    Supported
fsockopen:               Supported
SOAP Client:             Not Installed
Suhosin:                 Not Installed
MCrypt:                  Not Supported***
MbString:                Supported

===== Session Configuration =====

Session:                Disabled

you can see phpinfo at: https://portal.trueholdingsinc.com/phpin.php (too much to copy/paste.. ) Thx!

This here is all the packages that are provided as part of SCL for PHP 7 on CentOS 7:


Unforunately, unless mcrypt is part of one of those, it doesn't appear that mcrypt is available.

I don't imagine you could use the CentOS-provided PHP 5.4 for this particular app?

Yes, that is what i found as well. The only place i found mcrypt as part of php7 is in a Remi repo. If I remember correctly Remi repos do not play well with virtualmin? php5.4 will work it just is so old and buggy lol i was hoping to get php7 working.

Yeah that's a bit of a pickle isn't it :-)

We've definitely seen problems when using the REMI repository.

Doing some Googling, I did stumble upon a new collection in SCL that may help, if you're interested in experimenting.

This here:


That appears to contain some packages missing from the standard 7.0 PHP version... I'm curious if it works out to install the mcrypt from there?

Nice! I will give it a try and let you know how it goes. Thanks! Great find - i searched for hours and didn't run across this one..

Cha Ching! That worked like a charm! Installed and recognized!

Thanks a bunch Eric!


mcrypt support enabled mcrypt_filter support enabled Version 2.5.8 Api No 20021217 Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes Supported modes cbc cfb ctr ecb ncfb nofb ofb stream

Directive Local Value Master Value mcrypt.algorithms_dir no value no value mcrypt.modes_dir no value no value

That's fantastic, thanks for letting us know!

Perhaps we need to modify the instructions on our site to include adding that particular SCL collection, as there's certainly plenty of folks interested in the mcrypt module.

Hello strangers,

You dont need SCL for mcrypt.

I understand you are using remi repo for php v7.0 right?

Then you can use the command yum install php70-php-mcrypt.x86_64 that will install mycrypt from the remi repo that you already using for the php version.

You can also change the php70 to your according version like php71 or php56.

You can also list all the available packages like:

yum list php70*

and so on.

Maybe this is an addition to the documentation.

Also can someone give me any info on what problems remi repo gives? I dont have any problems and remi works like a charm, when wanted I can write a doc for remi repo? with all the php versions.

Thanks for your comment!

It's the SCL repo that's being used for PHP 7 in this case.

We do appreciate that some folks have had success with the REMI and other third party repo's.

We recommend caution in using third party repositories though, the SCL and EPEL repo's are the only ones we recommend for that. We've run into some pretty significant issues with other third party repositories.

We have instructions here for how to setup multiple side-by-side PHP versions using the SCL repo here:


And a community member did write up instructions here on how to setup the REMI repo:


Hello again,

The guide according to: https://www.virtualmin.com/node/48280

Is a replacement for 5.6 there are also easy ways of using remi with leaving the original 5.4 untouched. and using the virtualmin php selector for orginal one and the remi one.

Also is it possible to change the PHP selector code? for example I want to change the FPM pool name from 54 to something else? If that is possible I can write a tuturial for remi repo with fpm