12

I don't know why but for some reason my MAMP PRO doesn't allow me to change PHP version over host. I'm using MAMP PRO 4. If you take a look you will notice the option for that is disabled,

I left here a screenshot,

MAMP PRO configuration

Any idea?,

Regards!

Sebastian
  • 481
  • 4
  • 9

3 Answers3

26

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

Sebastian
  • 481
  • 4
  • 9
  • 11
    To run as CGI Mode, click on PHP on the side, then switch the mode to "Individual PHP version for every host (CGI mode)" and save. – sagesolutions Sep 11 '17 at 14:15
6

To run a different PHP version on each host, go Languages > PHP > Individual PHP version for every host (CGI mode).

Return to Settings > Hosts and under the host a dropdown should be available to choose your PHP version.

enter image description here

TheRealJAG
  • 1,978
  • 20
  • 16
  • Thanks for this answer, it helped me. For those using Windows MAMP PRO 5. You need to go to the main dropdown menu 'View' -> 'PHP' these options shown above are found there. – Hevski Oct 31 '22 at 10:55
2

Possibility 1: your server is running (you cannot change php version when the serving is running)

Possibility 2: you only have 1 version of php installed on your computer

Jonathan
  • 2,700
  • 4
  • 23
  • 41
  • 1
    Sorry but is not the case. I'm not new using this program It's only happens after I updated from MAMP PRO 3. This is really weird. Thanks! Any other advise? – Sebastian Jun 18 '17 at 15:23