Updating to MAMP 5 and how to get it working with Laravel

Categories: Development

Previously I had written about how to setup MAMP4 and get it working with Laravel, Since then MAMP 5 has come out and while not much is different I thought that I would go over some of the configuration changes needed to your environment up and running.

Install MAMP 5:

Download

Set up your document root.

Set the Web Server to Apache
Set the Document Root to ~/Sites Or where ever you keep your PHP projects.

Enable PHP 7.x

Install Memcached:

As before make sure that you have Memcached installed.

$ brew install memcached

Launch Memcached when the computer starts.

$ ln -sfv /usr/local/opt/memcached/*.plist ~/Library/LaunchAgents

Setup MAMP 5:

Configure PHP

Open /Applications/MAMP/bin/php/php7.x/conf/php.ini

Enable short tags
While WordPress coding standards wont allow short tags to be enabled… Who really has time for that.

short_open_tag = On

Enable Xdebug at the bottom of the file by Deleting the ; . It should already be there but will be commented out.

[xdebug]
zend_extension="/Applications/MAMP/bin/php/php7.x/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"

I usually also include the following for PHP Storm

xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1
xdebug.idekey=PHPSTORM

Enable Memcached with PHP.

For each version of PHP that you use with MAMP you will have to make these same changes.

Open /Applications/MAMP/bin/php/php7.x/conf/php.ini

Look for ; Extensions and uncomment or add memcached.so. Memcached will require that you have the igbinary.so extension installed as well.

extension=igbinary.so
extension=memcached.so

Startup MAMP and you should be up and running.


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!