Page 1 of 1

Switching PHP versions suddenly not switching CLI versions

Posted: Mon Jan 10, 2022 5:18 pm
by polera
I haven't needed to switch for weeks, but I use MAMP Pro to switch between PHP versions 5.6 and 7.4, but for some reason, it stopped switching the CLI version. Normally I go into the PHP section and change the PHP version then restart, and I always leave "Activate command line shortcuts..." and "Also activate shortcut for Composer" checked. For certain repos, I have to use Module or CGI, but switching anything there never had an issue before.

The only thing I'm finding that actually switches it for the CLI is to reboot the Mac... I'm on Big Sur, and have put off updating to Monterey because when I updated to Big Sur, it broke MAMP Pro until there was a "compatible" version. I can't tell in my research if there's a Monterey-compatible MAMP Pro, but I'll be in rough waters if I can't use MAMP Pro on my websites.

Can someone advise me on this?! I'm on MAMP Pro version 6.4. I did change MAMP's Apache http.conf just to enable the CustomLog, then I added a site-specific CustomLog (VirtualHost), but I don't see how that could have broken CLI PHP version switching. I don't use Mac's Apache or PHP and I don't think anything hits it but I'm not sure, it came with Catalina. MAMP effectively changes /etc/hosts properly, though I don't think that has anything to do with CLI version, maybe I'm wrong. I don't think the macOS version has anything to do with it either since things were working without me having to update anything. Could the http.conf have anything to do with it?!

Re: Switching PHP versions suddenly not switching CLI versions

Posted: Mon Jan 10, 2022 6:44 pm
by mampsupportmod
What doesn't work when you go to switch from Module to CLI? Is it greyed out? Any messages trying too?

For macOS Monterey question, I can say the latest version of MAMP v6.6.1 is working in macOS Monterey 12.1. However, I've found some issues others may want to wait before upgrading:


1. Apache randomly stopping. (macOS Monterey) (plenty of resources available)

2. MAMP Pro hanging on quit when Launch Group Servers is set to System Startup

(This is more annoying than anything, and sometimes causes SQL to randomly quit on quitting MAMP.)


Now these could be just me so waiting to see who else reports.

Re: Switching PHP versions suddenly not switching CLI versions

Posted: Thu Jan 13, 2022 2:42 pm
by polera
For some reason, closing my Terminal session in PHPStorm wasn't actually exiting it, so it kept the same bash profile settings. When I rebooted the Mac for another reason, it started working right.