The requested PHP extension ext-mcrypt * is missing from your system [closed]
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.
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.
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
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).