Igor's Blog
Programming, DIY, Games, Hacks, and Tech

I've been using MAMP for quite some time for my personal web development work. It's a great App but sometimes it feels like it is dumbing down some things a little bit too much. Selecting which PHP version that is used is one of those. It appears that MAMP only gives you the option of picking the latest two PHP versions that it ships with...
phpmamp_1.png


However, you're not limited to using just those two! In fact, if you check the MAMP php directory (/Applications/MAMP/bin/php) you will see that there are multiple other versions of PHP installed there.

So in my case, MAMP had PHP 7.1.1 as the default version and the only other available choice in the UI that it was giving me was version 7.0.15. I didn't want to use PHP 7.x at all since my server was still on 5.6.x. However, MAMP came with PHP 5.6.30 but wasn't giving me the option to select it.

Fortunately you can force MAMP to allow you to select the versions of PHP that you want to use with a few directory renames!
phpmamp_2.png




The trick is to rename whichever version of PHP you do not wish to use by putting an underscore (_) character in front of the original directory name. This is done in the MAMP php directory (/Applications/MAMP/bin/php). Rename all but the two versions you are interested in using and restart MAMP. After restarting you will be able to pick either of the two versions that you didn't rename.

In my case, I renamed all versions except 7.1.1 and 5.6.30. Now I can select between PHP 5.6 and PHP 7.1 development environments.
phpmamp_3.png


I've not tried this, but if you need a completely different version of PHP that isn't shipped with MAMP, you should be able to just add it to the MAMP php directory and select it as if it was one of the shipped versions, just follow the steps above to ensure MAMP lets you select it. Also follow the naming convention used my MAMP or it won't recognise that you've added a new PHP version.

-i

Please leave your comments or feedback below!
comments powered by Disqus
Other posts you may like...

Recent Blog Posts

How to enable the full stack trace in Maven's Surefire plugin for JUnit testing

Twelve elements of the Burst Mining Pool interface explained

TPG FTTB settings for the Billion BiPAC 8700AXL 1600 modem router

Protecting old Atari Lynx game boxes with snug fit plastic sleeves

How to fix SoapUI javax.net.ssl.SSLHandshakeException calling WebLogic 12.2 web services on Java 8

Woolworths (WOW) shares disappeared from Computer Share Investor Centre

Connecting the Dell UltraSharp U3415W monitor to a MacBookPro via USB-C

How to add/change PHP versions appearing in MAMP preferences

Fix the ORA-00904: ORA_ROWSCN: invalid identifier error in SQLDeveloper with a few easy steps

G Suite Gmail is broken on Safari due to new Google Content Security Policy settings

Recent Galleries

Protecting old Atari Lynx game boxes with snug fit plastic sleeves

Monument Valley 2 is released and does not disappoint

Space Food - Chocolate Ice Cream with Chocolate Chips

Legeod Star Wars AT-DP kit

DIY spare parts computer build with a RAIDMAX Anura case

Fake 'Lepin' brand Lego packaging

Hardwood garden bench with clear resin void filler

Fixing a 3D printer extruder that stopped heating up

Easily increase disk space in a Lenovo Ideapad 100S 14" laptop with an M.2 SSD

Making a multi-piece 3D printed solder spool holder stand

My Other Web Sites

Igor and Elise's Travels
Riverside Expressway Cam
300 George St Blogumentary

My Online Tools

UUID to OID Converter
Guru JSON-RPC Tester
Extrudifier Object Designer
Travel ┬ÁBlog

Blogs and Friends

Matt Moores Blog
Georgi's FlatPress Guide
Perplexing Permutations
The Security Sleuth
Ilia Rogatchevski
Travelling Fairy

Blog Activity

Blog Activity
Don't forget to
my Facebook page for more great articles!
Don't show this again