Skip to content

Instantly share code, notes, and snippets.

@ngocphamm
Created November 25, 2020 23:05
Show Gist options
  • Save ngocphamm/24d6b1fe2eed8bf0346112ba087d4a40 to your computer and use it in GitHub Desktop.
Save ngocphamm/24d6b1fe2eed8bf0346112ba087d4a40 to your computer and use it in GitHub Desktop.
~ » brew reinstall php
==> Downloading https://homebrew.bintray.com/bottles/php-7.4.12.catalina.bottle.tar.gz
Already downloaded: /Users/ngoc/Library/Caches/Homebrew/downloads/1c495d26ace1433ea9cfd1b88cbf959705e4ccc3c3306c6e149da14d49561df8--php-7.4.12.catalina.bottle.tar.gz
==> Reinstalling php
==> Pouring php-7.4.12.catalina.bottle.tar.gz
==> /usr/local/Cellar/php/7.4.12/bin/pear config-set php_ini /usr/local/etc/php/7.4/php.ini system
==> /usr/local/Cellar/php/7.4.12/bin/pear config-set php_dir /usr/local/share/pear system
==> /usr/local/Cellar/php/7.4.12/bin/pear config-set doc_dir /usr/local/share/pear/doc system
==> /usr/local/Cellar/php/7.4.12/bin/pear config-set ext_dir /usr/local/lib/php/pecl/20190902 system
==> /usr/local/Cellar/php/7.4.12/bin/pear config-set bin_dir /usr/local/opt/php/bin system
==> /usr/local/Cellar/php/7.4.12/bin/pear config-set data_dir /usr/local/share/pear/data system
==> /usr/local/Cellar/php/7.4.12/bin/pear config-set cfg_dir /usr/local/share/pear/cfg system
==> /usr/local/Cellar/php/7.4.12/bin/pear config-set www_dir /usr/local/share/pear/htdocs system
==> /usr/local/Cellar/php/7.4.12/bin/pear config-set man_dir /usr/local/share/man system
==> /usr/local/Cellar/php/7.4.12/bin/pear config-set test_dir /usr/local/share/pear/test system
==> /usr/local/Cellar/php/7.4.12/bin/pear config-set php_bin /usr/local/opt/php/bin/php system
==> /usr/local/Cellar/php/7.4.12/bin/pear update-channels
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php7_module /usr/local/opt/php/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.4/
To have launchd start php now and restart at login:
brew services start php
Or, if you don't want/need a background service you can just run:
php-fpm
==> Summary
🎉 /usr/local/Cellar/php/7.4.12: 497 files, 72.3MB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment