PHP mac

作者: 626ab7331d95 | 来源:发表于2018-08-10 10:47 被阅读0次

To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php7_module /usr/local/opt/php@7.1/lib/httpd/modules/libphp7.so

<FilesMatch \.php$>
    SetHandler application/x-httpd-php
</FilesMatch>

Finally, check DirectoryIndex includes index.php
DirectoryIndex index.php index.html

The php.ini and php-fpm.ini file can be found in:
/usr/local/etc/php/7.1/

This formula is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/php@7.1/bin:PATH"' >> ~/.zshrc echo 'export PATH="/usr/local/opt/php@7.1/sbin:PATH"' >> ~/.zshrc

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/php@7.1/lib
CPPFLAGS: -I/usr/local/opt/php@7.1/include

To have launchd start php@7.1 now and restart at login:
brew services start php@7.1
Or, if you don't want/need a background service you can just run:
php-fpm
==> Summary
🍺 /usr/local/Cellar/php@7.1/7.1.20: 514 files, 67.2MB
==> Caveats
==> php@7.1
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php7_module /usr/local/opt/php@7.1/lib/httpd/modules/libphp7.so

<FilesMatch \.php$>
    SetHandler application/x-httpd-php
</FilesMatch>

Finally, check DirectoryIndex includes index.php
DirectoryIndex index.php index.html

The php.ini and php-fpm.ini file can be found in:
/usr/local/etc/php/7.1/

This formula is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/php@7.1/bin:PATH"' >> ~/.zshrc echo 'export PATH="/usr/local/opt/php@7.1/sbin:PATH"' >> ~/.zshrc

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/php@7.1/lib
CPPFLAGS: -I/usr/local/opt/php@7.1/include

To have launchd start php@7.1 now and restart at login:
brew services start php@7.1
Or, if you don't want/need a background service you can just run:
php-fpm

brew services restart php@7.1

相关文章

网友评论

      本文标题:PHP mac

      本文链接:https://www.haomeiwen.com/subject/qcmqbftx.html