1. cjobes
  2. MAMP - General Discussion
  3. Thursday, 16 July 2020

- - - I am very confused about how MAMP Pro is supposed to work on the Mac.

I thought I could create a host and assign it the PHP version to use. My expectation was that MAMP would fix it so the PHP version given that host would automatically be used with that host.

What I have learned is that the only way to run a specific version of PHP at all is to edit my .zshrc (.bash_profile). So now I have to basically run only one version of PHP at a time by editing the .zshrc for each site I want to work on.

Example: in my .zshrc I have the following:

#export PATH="/Applications/MAMP/bin/php/php5.6.40/bin:$PATH"
#export PATH="/Applications/MAMP/bin/php/php5.4.45/bin:$PATH"
#export PATH="/Applications/MAMP/bin/php/php7.0.33/bin:$PATH"
export PATH="/Applications/MAMP/bin/php/php7.1.32/bin:$PATH"
#export PATH="/Applications/MAMP/bin/php/php7.2.21/bin:$PATH"
#export PATH="/Applications/MAMP/bin/php/php7.2.22/bin:$PATH"
#export PATH="/Applications/MAMP/bin/php/php7.3.0/bin:$PATH"
#export PATH="/Applications/MAMP/bin/php/php7.3.8/bin:$PATH"

So whatever I chose in MAMP is really of zero consequence. I can only run sites that can use PHP version 7.1.32 (per my example above)

If I want to run another site that uses PHP version 5.4.45 I can't just simply run it, I have to change to that version by commenting out PHP version 7.1.32 and uncommenting PHP version 5.4.45.

So am I missing something here? What is the point of having a selection of a PHP version for a host, if it is just for looks? I don't get it.

This is baffling to me.

Accepted Answer Pending Moderation

So using PHP CGI mode in MAMP and changing the PHP versions has not effect whatsoever on your site? What version of MAMP are you running?

  1. more than a month ago
  2. MAMP - General Discussion
  3. # 1
  • Page :
  • 1

There are no replies made for this post yet.
Be one of the first to reply to this post!