I use homebrew to get my Mac run with latest PHP7 version instead of directly messing around with the original library come with the SierraOS.
Firstly, the latest update of homebrew, PHP module has no longer installed with Apache.
You need:
in order to download the PHP with libphp7.sobrew install php70 --with-apache
(this is the file you need when you use apache to load php module)
2nd, after you have Apache downloaded with your PHP through homebrew.
All the manual configurations, by default,
have to be done inside /usr/local/etc/apache2/2.4 (yours might be 2.2, based on your installed version).
Remember those httpd.conf, httpd-vhost.conf, etc... they're all inside the /usr/local/etc/apache2/2.4 folder?
and add a missing media type to your mime_module which it's the most obscure step (to a beginner like me) to missed out during configuration.
Symptom check (whether or not to add the line above):AddType application/x-httpd-php .php
- php module is loaded correctly, but plain php code still showing in your localhost, for instance, php_info() doesn't work
- your sudo apachectl configtest show nothing wrong "Syntax OK"
No comments:
Post a Comment
Hey, thank you for spending time leaving some thoughts, that would be really helpful as encouragement for us to write more quality articles! Thank you!