Erkan BALABAN
Erkan BALABAN

Reputation: 1376

Install PHP 7.1 on MacOS Sierra

I am using homebrew. I installed php 7.1. I added

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

to httpd.conf file. And also i added

<IfModule php7_module>
 AddType application/x-httpd-php .php
 AddType application/x-httpd-php-source .phps

 <IfModule dir_module>
  DirectoryIndex index.html index.php
 </IfModule>
</IfModule>

to httpd.conf. There is phpinfo.php file on the folder. When i type locahost i can see "It works". but when i type localhost/phpinfo.php there is no result.

What did i forget? Or you can give an article which i can follow.

Upvotes: 1

Views: 2203

Answers (2)

Marco
Marco

Reputation: 15027

You just need to restart Apache (httpd) to make the configuration changes take effect. Restarting your computer does that, but you can also run in Terminal:

sudo apachectl restart

Upvotes: 2

Erkan BALABAN
Erkan BALABAN

Reputation: 1376

I solved it. If you face this problem, and you sure about that you did everything right, just restart the computer.

Upvotes: 0

Related Questions