1

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.

Laurence
  • 58,936
  • 21
  • 171
  • 212
  • possible duplicate of [Laravel requires the Mcrypt PHP extension](http://stackoverflow.com/questions/16830405/laravel-requires-the-mcrypt-php-extension) – rmobis Feb 09 '14 at 07:26
  • Dear the answers that were given did not solved my problem so I asked this question I have tried all those steps. –  Feb 09 '14 at 07:31

2 Answers2

0

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:

<?php
phpinfo()?
?>
Elliot Fehr
  • 764
  • 6
  • 10
  • In my MAMP in phpinfo it shows Mcrypt enabled but when I write PHP artisan in terminal it gives the error: Laravel requires the PHP Mcrypt extenstion –  Feb 09 '14 at 07:58
  • Ahhh... I had the same issue. What version of PHP are you using? – Elliot Fehr Feb 09 '14 at 15:02
  • My MAMP php version is: 5.4.10 please help me I am new with it. –  Feb 11 '14 at 04:44
  • This should answer your question: [Check Here](http://stackoverflow.com/questions/16830405/laravel-requires-the-mcrypt-php-extension) – Elliot Fehr Feb 22 '14 at 18:10
0

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.

Community
  • 1
  • 1
Joel Hinz
  • 24,719
  • 6
  • 62
  • 75