When using Laravel 4's migrate function on OSX, you may encounter an error indicating a missing Mcrypt PHP extension. Despite apparently being enabled, you're still encountering this issue.
To resolve this, first check if you have MAMP installed. If you do, proceed with the following:
export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH
Note: Replace "php5.4.10" with the actual MAMP PHP version by running cd /Applications/MAMP/bin/php in the terminal.
After saving the changes, restart the terminal. You should now be using the correct PHP version and the error should no longer appear.
The above is the detailed content of Why Is Laravel's Migration Failing Due to a Missing Mcrypt Extension on OSX, and How Can I Fix It?. For more information, please follow other related articles on the PHP Chinese website!