The requested PHP extension ext-mcrypt * is missing from your system
Solution 1
Well I simply went back to basics and uninstalled Mac Server and went back to MAMP, this performed all the latest updates and installs required, as my system was conflicting with two separate installs etc
Solution 2
Got the same error in Linux(Ubuntu 14.04)
Check that ini exists
/etc/php5/mods-available/mcrypt.ini
If it is so, check that you have symlink to ini.
Something like in directory /etc/php5/cli/conf.d
05-mcrypt.ini -> ../../mods-available/mcrypt.ini
If there is no symlink create it. After installing the php5-mcrypt
extension I have no symlink, only ini file. That is why create the symlink manualy.
You can use sudo php5enmod mcrypt to enable the mod. It will create the symlink for you.
Solution 3
Try the following solution:
sudo apt-get install php5-mcrypt
sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
sudo php5enmod mcrypt
sudo service apache2 restart
Good luck,
-Iulian
Solution 4
I had the same issue - mcrypt showed as installed for CLI but missing via command line. To fix, I ran
#php -i
to find the location of the command line version's php.ini file and then added
extension=mcrypt.so
After that, running #php -m
will show you what modules are installed for the command line version and mcrypt should be there. If not, your "Solution 1" and "Solution 2" options should help you build the module - then just make sure the module is installed (or gets copied) to your php installation's module (extension) directory (something like /usr/lib/php/extensions/no-debug-non-zts-20100525/
or check where extensions_dir
value in php.ini points to).
Related videos on Youtube
Simon Davies
Developer of web but not the spider kind. Also a rugby ref on the weekends...
Updated on September 18, 2022Comments
-
Simon Davies over 1 year
I have updated my php to version 5.4.13 etc and well in the terminal my version of php states this
PHP 5.4.12 (cli) (built: Mar 16 2013 21:46:23)
But running a composer install io get the following error.
The requested PHP extension ext-mcrypt * is missing from your system
Anyway i have tried several emthods to get this to work etc and nothing:
I have used the following: Solution One and Solution Two, they both use a similar approach but i stil ge the errors.
I then did a php info test and this shows that the version is 5.3.15 and that mycrypt says mcrypt support is enabled
So is my server using this php and the one in my terminal using another as this what it seems
Any ideas how to fix this?
I am using a MAC Mountain Lion with Mountain Lion Sever (latest), xcode and all operations are up to date and i have restarted the server.
-
Simon Davies about 10 yearsthanks for the reply on this but in the time i have moved over to Virtual servers mainly using Vagrant and a file call Vaprobash. thanks again
-
Ammar Al-Kawaldeh over 9 yearsThanks a lot, this worked in Ubuntu 14.04. May I ask a couple questions: 1. How did you guess there was no .ini file? 2. Why does the php5-mcrypt package not do this automatically? Should I report a bug?
-
Ammar Al-Kawaldeh over 9 yearsAlso, how did you know it had to be 05-filename, and not some other int at the start?
-
Noah Sussman over 8 yearsCan you explain how you might do this without
php5enmod
? Most of us don't have that on our systems.