0

I've been using MAMP for a while now and the LITE version of MAMP has always shown 2 options for PHP versions and they have always been the latest of different versions, IE PHP 5.5.X and 5.6.X.

MAMP 4.1 only shows PHP 7.0.13 and PHP 7.1.0 - neither of which I'm able to use as I'm currently working with SilverStripe 3.5.2 which requires PHP 5.3.3 or higher, but lower then PHP 7.

enter image description here

Is there any way to disable at least 7.0.13 to get 5.6.28 to show up as an option to work with? I'd also rather not have to do a hacky solution so as to edit the httpd.conf or otherwise. I was looking for a more official way to change it ASIDE from upgrading to MAMP 4 PRO.

The documentation at the MAMP website doesn't seem to mention a way to do this - and I have tried changing the directory name under "/MAMP/bin/php/add-x-in-front-of-php-version-directory-here".

I am aware that XAMPP solves this problem for me, but I wanted to see if there is a solution for MAMP 4.1 before making the switch.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
  • MAMP only shows two versions, you should rename the folders of the PHP versions you're not using. http://stackoverflow.com/questions/16783558/how-can-i-add-additional-php-versions-to-mamp – PhilS Feb 08 '17 at 13:10
  • I've tried that, and restarted MAMP and the versions did not change. I added a x in front of them IE: 'x php7.0.13'. –  Feb 08 '17 at 19:16
  • 1
    I would have assumed renaming it any way at all would have the effect but this video shows renaming the folders with content after too, so maybe duplicate this https://www.youtube.com/watch?v=lHXwUXnq3Zw – PhilS Feb 08 '17 at 21:07
  • 1
    There is a module which makes SilverStripe run on php7. http://addons.silverstripe.org/add-ons/wernerkrauss/silverstripe-3-php7 – Gavin Bruce Feb 08 '17 at 22:29
  • @PhilS thanks for your suggested, I've answered the question myself so that it might help someone else attempting this same thing. –  Feb 09 '17 at 00:48
  • @GavinBruce I have not given that a try just yet, but that does look interesting and I will definitely give that a shot! But I did however want to solve this particular problem in the event the module were to give me problems and I would be back to square one. –  Feb 09 '17 at 00:49

1 Answers1

4

This problem was solved by instead renaming the directories from the other end as suggested by PhilS in the comments from my original post above.

Renaming the directory from the 'right hand side' seems to do the trick as shown here in the image:

enter image description here

Now when choosing a PHP version it will skip over 7.0.13 and show 5.6.28 instead:

enter image description here

Community
  • 1
  • 1