Won't execute PHP scripts in PHP70
JohnnyWalkerDigital opened this issue · comments
Johnny Walker commented
But PHP56 works fine.
Not sure what's going on. brew doctor
is happy. php --ini
shows:
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
But .php files themselves aren't executed and just show code in the browser. If I switch back to PHP56 they work fine.
Johnny Walker commented
Turns out I needed to add a line to httpd.conf
:
AddType application/x-httpd-php .php
Strangely this wasn't needed for PHP56.