You receiving Mcrypt
not found error because your Mac
terminal using system's PHP
and unfortunately, Default PHP don't have the MyCrypt extension.
How to enable Mcrypt
:
The easiest solution is, use the MAMP's PHP
How to use MAMP?
Simply edit ~/.profile
(ie. open Terminal.app, type vim ~/.profile
or nano ~/.profile
) and add the following line to end of the file:
export PATH=/Applications/MAMP/bin/php/php5.x.x/bin/:$PATH
Note that you should replace x.x
in php5.x.x
with the MAMP Pro PHP version.
My setting:
in your terminal:
nano /Users/anam/.bash_profile
^^^ your mac home directory
I have placed the following code to my .bash_profile
:
export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH