How can I add additional PHP versions to MAMP
Found a quick fix in the MAMP forums.
Basically it seems MAMP is only allowing 2 versions of PHP to show up. Quick fix, rename the folders you're not bothered about using, for me this meant adding an "X" to my /Applications/MAMP/bin/php/php5.4.10_X folder. Now 5.2.17 and 5.3.20 show up in the mamp prefs.
Done!
Edit - if the PHP version you require isn't in the PHP folder, you can download the version you require from http://www.mamp.info/en/downloads/
Edit - MAMP don't seem to provide links to the alternative PHP versions on the download page any more. Use WayBackMachine https://web.archive.org/web/20180131074715/http://www.mamp.info/en/downloads/
MAMP 4.4 - Installing additional PHP versions failed
I was having the same issue. Luckily they updated to 4.4.1 to resolve the issue. MAMP itself didn't notice the upgrade but if you download MAMP from the website, it's version 4.4.1.
Additionally you can download the PHP versions manually on the mamp website, here, and then unzip to the /Applications/MAMP/bin/php folder.
MAMP PRO doesn't allow me to change PHP version over hosts
I just resolved. The error was running PHP as module mode, if you want to have multiples version for each vhost you must run as CGI
How to change PHP version on MAMP 4.1
As mentioned by @Scott in the comments under your question:
Your here is the right link. Use the bottom answer to rename the
bin/php directory. The MAMP preference pane will show the 2 latest
versions in the php directory. – Scott Eisenberg
And the answer in that links is:
First stop the Server if its running. Go to "/Applications/MAMP/bin/",
rename the PHP Version you don't need (MAMP is only allowed to use 2
PHP Versions), e.g. "_php5.2.17". Now MAMP will use the php versions
that are left. Go to the MAMP Manager and then settings, then switch
to the php version you need.
In my case (and similarly yours), I renamed the folder named php7.1.1
to _php7.1.1
and now MAMP shows me 5.6.30
and 7.0.15
in the preferences pane.
Related Topics
Preparing PHP Application to Use with Utf-8
Sort Array by Object Property in PHP
Automatically Trimming an Mp3 in PHP
Google-Like Search Engine in PHP/Mysql
How to Make Laravel Eloquent "In" Query
Have Trouble Installing PHPmyadmin on PHP7 Apache/2.4.7 (Ubuntu)
Group Subarrays by One Column, Make Comma-Separated Values from Other Column Within Groups
PHP - a Db Abstraction Layer Use Static Class VS Singleton Object
How to Flush Data to Browser But Continue Executing
How to Get Google +1 Count for Current Page in PHP
JSON_Encode or Remove Last Comma
How Is Output(Echo) Array Without Use of JSON_Encode(Codeigniter)