0

I tried to upgrade php 5.6 to php 7, but I caused there a error with trying of this method: https://coolestguidesontheplanet.com/upgrade-php-on-osx/ now I uninstalled this and tried to install php 7 over brew, it works but is still not added to apache, in browser I see still only pure php code.

I tried also to add this line to httpd.conf but no changes:

LoadModule php7_module /usr/local/opt/php70/libexec/apache2/libphp7.so

the path is correct, knows someone how can I solve this?

1 Answer 1

2

You may need to add the following declaration to httpd.conf for Apache to parse PHP files via php7_module:

 AddType application/x-httpd-php .php

Restarting of Apache may also be required for the new settings to take effect.

Sign up to request clarification or add additional context in comments.

1 Comment

thx! Both two snippets fixed the problem for me. But WTF .. - Why have these lines been missing in brew's httpd.conf /usr/local/etc/httpd/httpd.conf after installing apache and php72 ? :(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.