1.6 KiB
1.6 KiB
ls -Installer PHP (homebrew)
Installation:
$ brew tap homebrew/php
$ brew update
$ brew install php71 --with-httpd
Configurer PHP:
$ bbedit /usr/local/etc/php/7.1/php.ini
Modifier le httpd.conf:
httpd.conf:
#LoadModule php7_module /usr/local/Cellar/php71/7.1.11_22/libexec/apache2/libphp7.so
LoadModule php7_module /usr/local/opt/php71/libexec/apache2/libphp7.so
Version de PHP:
$ php -v
Changer de version:
$ brew unlink php54 && brew link php53
Erreur: Failed loading /usr/local/opt/php71-opcache/opcache.so: dlopen(/usr/local/opt/php71-opcache/opcache.so, 9): Symbol not found: compilerglobals ⇒
$ brew reinstall php71-opcache --build-from-source
$ brew reinstall php71-apcu --build-from-source
$ brew reinstall php71-xdebug --build-from-source
$ brew reinstall php71-yaml --build-from-source
Extensions:
Liste des extensions (Homebrew):
$ brew search php71
Installer l'extension Tideways:
:fa-link: https://tideways.io/profiler/docs/setup/installation#macos-homebrew
$ brew tap tideways/homebrew-profiler
$ brew install tideways-daemon-tideways
Puis ajouter dans le php.ini
extension=/usr/local/opt/php71/lib/php/extensions/no-debug-non-zts-20160303/tideways.so
Idem pour mongodb
extension=/usr/local/opt/php71/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so
Liens:
:fa-link: PHP (osx) (package PHP)