0

I am trying to install Learning Locker on Mac with OSX, I am using php55 installed with brew. I have done the following:

$brew install php55
$brew install mcrypt
$brew install php55-mcrypt

I am at the step to run the migration, when I do I get the following error:

$php artisan migrate
 Mcrypt PHP extension required.

I have already tried the solutions at: Laravel requires the Mcrypt PHP extension

& http://digitizor.com/2014/06/29/fix-mcrypt-php-extension-required-laravel/

I am actually a Rails developer and have never used mongo and am not familiar with PHP at all, so needless to say I am in very foreign territory here.

Thanks in advance for any help!

Community
  • 1
  • 1

1 Answers1

0

I don't think you need to run $brew install mcrypt, at least for the latest versions. For me the problem was that I had multiple versions of php installed and the mcrypt extension was added to the wrong php.ini. I believe Homebrew will setup the extension for you here:

/usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini

Try running brew info php56 (or whatever version you have). This provides some insightful information under the caveats section:

==> Caveats

...

The php.ini file can be found in: /usr/local/etc/php/5.6/php.ini

If you are having issues with custom extension compiling, ensure that you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:

  PATH="/usr/local/bin:$PATH"

PHP56 Extensions will always be compiled against this PHP. Please install them using --without-homebrew-php to enable compiling against system PHP.

...

Also, make sure your running against the latest brew:

$ brew update
$ brew install php56
//or upgrade: $ brew upgrade php56
$ brew install php56-mcrypt
BatteryAcid
  • 8,381
  • 5
  • 28
  • 40