This question already has an answer here:
- Apache is not interpreting .PHP files 8 answers
NOTE: This is not a duplicate of, nor is the answer here: Apache is not interpreting .PHP files
On my local Apache webserver, and I have PHP 5.6 and 7.0 installed. When I run 7.0 the scripts are not executed (just raw text is displayed), but when I switch to PHP 5.6 everything is fine.
I've checked my
httpd.conf when running 7.0, and it's correct:
LoadModule php7_module /usr/local/opt/php70/libexec/apache2/libphp7.so
php --ini in terminal produces the following:
Configuration File (php.ini) Path: /usr/local/etc/php/7.0 Loaded Configuration File: /usr/local/etc/php/7.0/php.ini Scan for additional .ini files in: /usr/local/etc/php/7.0/conf.d Additional .ini files parsed: /usr/local/etc/php/7.0/conf.d/ext-mcrypt.ini
Which looks correct.
apachectl -v produces:
Server version: Apache/2.4.18 (Unix) Server built: Feb 20 2016 20:03:19
I feel like it's an issue with my Apache config.