Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Laravel requires the Mcrypt PHP extension

I am trying to use the migrate function in Laravel 4 on OSX. However, I am getting the following error:
Laravel requires the Mcrypt PHP extension.


As far as I understand, it's already enabled.

What is wrong, and how can I fix it?
by

2 Answers

Bharatgxwzm
For non MAMP or XAMPP users on OSX (with homebrew installed):
brew install homebrew/php/php56-mcrypt


Cheers!
sandhya6gczb
The web enabled extensions and command line enabled extensions can differ. Run php -m in your terminal and check to see if mcrypt is listed. If it's not then check where the command line is loading your php.ini file from by running php --ini from your terminal.

In this php.ini file you can enable the extension.

Login / Signup to Answer the Question.