Confused on MAMP mod_php and CGI

All MAMP discussions around troubleshooting and anything related to MAMP. Be as detailed as possible here when posting an issue.
Post Reply
polera
Posts: 11
Joined: Mon Jan 10, 2022 4:36 pm

Confused on MAMP mod_php and CGI

Post by polera »

In MAMP Pro (currently 6.6.2 for macOS Monterey), in the PHP section, to get multiple PHP sites to run properly with composer CLI commands, I've been using 'Mode: Module (all hosts use the same PHP version)' then changing the "Default version" and restarting the server. This may not be the best set up, but it's been the most convenient I've found. I'm open to something better, but that's not really why I'm here right now.

As I'm trying to install a new site who's tech stack has recommendations for "mod_php/CGI", and looking over phpinfo() output, I'm finding myself confused on what MAMP actually means by "Mode: Module" or "Mode: CGI (every host may be set to a different PHP version)" (note that I prefer the CGI option but it was just too many hoops to jump through when I had to switch sites or composer PHP versions). I already thought I understood what they mean, but the phpinfo is apparently stating something different.

With Mode: Module selected, my site's phpinfo has only one reference to mod_php, in Configuration > apache2handler > Loaded Modules (which also contains mod_cgi), but has 15 references to CGI... here's a few of them:

Configure Command > '--disable-cgi'
Apache Version > mod_fastcgi
SERVER_SOFTWARE > mod_fastcgi
GATEWAY_INTERFACE > CGI/1.1
(the rest are just credits)

So... is the site running mod_php or CGI?!
polera
Posts: 11
Joined: Mon Jan 10, 2022 4:36 pm

Re: Confused on MAMP mod_php and CGI

Post by polera »

Nobody has any idea what I'm talking about?
Post Reply