Setup MAMP 3.0.7 and PHP 5.6.1 with Laravel

Solving the MAMP php 5.6.1 php.ini configuration error.

Categories: Development

I recently updated my MacBook Pro to OSX 10.10 Yosemite and unlike my work computer, I had some issues. I decided to also upgrade MAMP while I was at it to version 3.0.7 and this fixed the issue I was having but also caused some other issues with Command-line PHP.

Once I confirmed that the start error was corrected I confirmed that I was running MAMP’s version of PHP in the command line.

Everything was good, When I ran artisan I got the “Mcrypt PHP extension required.” Error.

This was bothering me since the extension in /Applications/MAMP/bin/php/php5.6.1/conf/php.ini was included.

Running php -m didn’t list Mcrypt, however, the Redline and PCNTL extensions were showing up.

I eventually noticed that the php.ini for version 5.6.1 was actually looking in the wrong location for extensions. The reason Redline and PCNTL showed up at all was that I gave them a hard path.

Somewhere around line 422 of the php.ini you should see “extension_dir” and change no-debug-non-zts-20121212 to no-debug-non-zts-20131226

Close and reload terminal, run artisan again and hopefully the error is gone.

For easy access here are some other helpful notes on getting things set up for MAMP, Laravel, Composer, and the command line.

  1. OSX Command line MAMP for use with Laravel and Composer.
  2. Laravel Tinker ( Boris ) + MAMP + OS X Yosemite 

Adam Patterson

Adam Patterson

User Interface Designer & Developer with a background in UX. I have spent 5 years as a professionally certified bicycle mechanic and ride year-round.

I am a husband and father of two, I enjoy photography, music, movies, coffee, and good food.

You can find me on Twitter, Instagram, and YouTube!