I searched the net, I followed the instructions to solve this problem but I could not solve it, when I want to use Laravel php artisian it gives errors like this:
Laravel requires php Mcrypt extenstion.
Note: I am using MAMP in Mac
please give example and solution for mac with MAMP.
It's quite possible that your command-line PHP isn't the same that MAMP is using, but rather the one that came with OSX. To find out, you can open your terminal and type
php -i | grep php.ini
, which will show you what ini file you're using.If this is the case, which seems likely, you can follow the steps of older SO posts such as this one to create a symlink or overwrite the default PHP.
Alternatively, you can upgrade your system's PHP using Homebrew, for instance. I'm running 5.5.8 on my Macs, and it's working great. Do note that I do not necessarily recommend this, though, as configuring MAMP to use the new version isn't a fun experience. Also note that if you do this, you'll have to install both PHP and Mcrypt through Homebrew.
I had a similar issue on Ubuntu 12.04. What version of PHP are you running and does Mcrypt show up as active when you run: