I'm trying to set up PHP following the steps from https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions
I installed php brew install php71 --with-httpd24
But when I open the file /usr/local/etc/apache2/2.4/httpd.conf the php module is not there, I don't have any LoadModule php7_module
What am I missing? Thank you in advance
Most likely your Apache http server is not able to understand what the.php file is because the httpd.conf configuration file is not set to load php module. Make sure php installed yum install php
check the existence of php files
$ ls /etc | grep php
php.d
php.ini
The most important thing we need to check is that there is a php module
$ ls /etc/httpd/modules/ | grep php
libphp5.so
We need to add the following line somewhere in the /etc/httpd/conf/httpd.conf
file. Find the place in the document where all the LoadModule commands are by entering /LoadModule and pressing enter, than add the line there.
LoadModule php5_module modules/libphp5.so
Restart apache
$ apachectl restart
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.