Not sure how it works on Macs, but in Linux you have to explictly enable the mcrypt module too. See http://stackoverflow.com/questions/16830405/laravel-requires-the-mcrypt-php-extension
And then restart Apache.
I had to switch MAMP to php 5.5.17. No matter what i tried, i could not get version 5.6.1 to recognize the mcrypt extension
all you need is the following line in your .bash_profile
PATH=/Applications/MAMP/bin/php/php5.5.17/bin:$PATH
once you switch to 5.5.17, run "php -m" in terminal and ensure "mcrypt" is listed in the modules
bll44 said:
I had to switch MAMP to php 5.5.17. No matter what i tried, i could not get version 5.6.1 to recognize the mcrypt extension
all you need is the following line in your .bash_profile
PATH=/Applications/MAMP/bin/php/php5.5.17/bin:$PATH
once you switch to 5.5.17, run "php -m" in terminal and ensure "mcrypt" is listed in the modules
Same issue here. I think MAMP is jsut the problem. I saw on http://www.mamp.info/en/downloads/ 5.6.2 is available (and not 5.6.1) but haven't tried
what sudo command do you use to get to the bash profile?
I upgraded to Yosemite a few weeks ago, and had similar problems.
I am running the default php install that comes with it, (5.5.4) but I had similar problems. brew wouldn't work, the exporting wouldnt work. In the end I had to download the php source, libmcrypt source and build it myself.
Have you tried following along to this : http://coolestguidesontheplanet.com/install-mcrypt-php-mac-osx-10-10-yosemite-development-server/
This was my primary reference. You are running 5.6, but if you managed to go up there from the default install, you should have no issues following the instructions here to build mcrypt against that. You'll need xcode command line tools installed though...
By default Mac uses built in PHP, you can check that by running
which php
Results something like
/opt/local/bin/php
The result should be PHP from MAMP directory, which you can get by running following command ;)
sudo ln -s /Applications/MAMP/bin/php/php5.4.4/bin/php /opt/local/bin/php
*check for PHP version you want. **The other way can be updating your .bash_profile file.
I had exactly same problem here is solution (marked answer) http://stackoverflow.com/questions/26493762/yosemite-php-gd-installation + comments
See if this works:
If error PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory
in CLI
sudo mkdir /var/mysql
cd /var/mysql
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock
If php version pointing to Mac PHP version and not MAMP
then in CLI
touch .bash_profile
open .bash_profile
then type:
export PATH=/Applications/MAMP/bin/php/php5.5.10/bin:$PATH
https://discussions.apple.com/message/20527774#20527774
To download Mcrypt PHP Library
I came across this thread after having exaclty the same problem. My MAMP installation is setup correctly and mcypt is definitely enabled. I think the problem is with the global composer installation.
I downloaded the composer.phar file and after running the create-project file using the composer.phar file laravel 5 installed without any errors.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community