After using brew to install Apache version 2.4.46 on Mac OS Big Sur 11.2.3, and using brew to install PHP 8.0.6, I am unable to run PHP. I am running Apache from /usr/local/etc/httpd, and my Document Root is at /usr/local/var/www. I am not using the Apple supplied Apache.
Here is my phpinfo.php:
Here is my phpinfo.html:
Testing PHP embedded in HTML
Testing PHP embedded in HTML
Attempting to access https://myserver/phpinfo.php displays or downloads rather than executing the PHP code. Attempting to access https://myserver/phpinfo.html displays the Title and Heading but not the PHP result. LoadModule mod_php does not appear (even commented out) in my httpd.conf file. Everything else appears to work fine. What do I need to do to enable PHP?
Asked by Herb
(31 rep)
Jun 11, 2021, 12:58 AM
Last activity: Jul 5, 2024, 01:06 AM
Last activity: Jul 5, 2024, 01:06 AM