问题原文
原帖链接 · pcgben · CC BY-SA 3.0
Recently installed php71 on my local test environment.
I have an index.php file with phpinfo() in the web root directory.
When I LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so, index.php renders correctly, reporting the expected php version.
Alternatively, LoadModule php7_module /usr/local/opt/php71/libexec/apache2/libphp7.so gives a 403 forbidden message.
This is the same for all of my local web root directories. They render correctly in their entirety when using php5.6, and give me a 403 error when using php7.1.
Do php versions interpret httpd-vhosts.conf differently?
已采纳解答
原帖链接 · pcgben · CC BY-SA 3.0
Php7.1 requires the following addition to httpd.conf
SetHandler application/x-httpd-php
When reverting back to php5.6, that line must be commented out, or again, the php code will not be interpreted.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
