Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

closed as off-topic by Michael Hampton Mar 14 at 16:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – Michael Hampton
If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers 4

Got the same error in Linux(Ubuntu 14.04)

Check that ini exists


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.

share|improve this answer
thanks 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 –  Simon Davies Apr 29 '14 at 20:13
Thanks 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? –  aditya menon Sep 30 '14 at 3:34
Also, how did you know it had to be 05-filename, and not some other int at the start? –  aditya menon Sep 30 '14 at 3:34

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,


share|improve this answer

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

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).

share|improve this answer
up vote 0 down vote accepted

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

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.