HTML as PHP
Posted: Mon Aug 18, 2025 10:37 pm
I'm having trouble with MAMP 7.x handling .html files as .php files on a new Mac.
I've done this for many years with previous versions of MAMP by adding the following to the httpd.conf file:
Normally, Apache (via MAMP or on Linux) treats the HTML as a PHP file and resolves any PHP variables/placeholders that are in the HTML. With MAMP 7.x, the browser tries to download the requested HTML file (this is typical of not adding the above line to the Apache config file).
I tried to install 6.9 on this new Mac (that is the version running on my other Mac without any issues), but I get an error that 6.9 cannot run unless a previous version of 6.x was installed on the Mac.
Has anyone run into this issue with MAMP 7.x? Or is anyone else running .html files as .php successfully on 7.x?
Thanks,
WSG
I've done this for many years with previous versions of MAMP by adding the following to the httpd.conf file:
Code: Select all
AddType application/x-httpd-php .php .phtml .htmlI tried to install 6.9 on this new Mac (that is the version running on my other Mac without any issues), but I get an error that 6.9 cannot run unless a previous version of 6.x was installed on the Mac.
Has anyone run into this issue with MAMP 7.x? Or is anyone else running .html files as .php successfully on 7.x?
Thanks,
WSG