Sunday, September 14, 2014
Laravel requires Mcrypt php extenstion when installing with composer in MAMP
When I was installing Laravel 4 via composer, it failed at the end because it asked to unable Mcrypt extension in php.
Generally MAMP using its native php. You can find it just type,
which php
in the terminal.
If it returns '/usr/bin/php', that means MAMP using its native php.
You should change it to MAMP's php.
To do it open or create file called '.bash_profile' (used '.' because it is a hidden file) in your home directory.
cd ~
vim .bash_profile (use vim or other texteditor)
And add this line to it.
export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH
To make sure what php versions are available, just type
cd /Applications/MAMP/bin/php
It will show all the php versions currently installed. Use latest or your preferred version and add it to above line.
After saving the file, just restart the MAMP and run composer update again in new Terminal window. (Same terminal window will not work.)
References :
http://laravel.com/docs/quick
https://getcomposer.org/doc/03-cli.md#install
http://stackoverflow.com/questions/16830405/laravel-requires-the-mcrypt-php-extension
Labels:
Laravel composer
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment