# ls -Installer PHP (homebrew) ### Installation: ```bash $ brew tap homebrew/php $ brew update $ brew install php71 --with-httpd ``` ### Configurer PHP: ```bash $ bbedit /usr/local/etc/php/7.1/php.ini ``` ### Modifier le httpd.conf: ```http 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: ```bash $ php -v ``` ### Changer de version: ```bash $ 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: *compiler*globals ⇒ ```bash $ 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): ```bash $ brew search php71 ``` ### Installer l'extension Tideways: [:fa-link: https://tideways.io/profiler/docs/setup/installation#macos-homebrew](https://tideways.io/profiler/docs/setup/installation#macos-homebrew) ```bash $ 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)](https://php-osx.liip.ch/) (package PHP) [Installer Xhprof pour PHP7](Xhprof.md) [Installer mongodb](mongodb.md)