Debugger PHP sur macOS
Installation de Homebrew
xcode-select –install
https://github.com/Homebrew/brew/tree/master/docs#readme
http://www.websightdesigns.com/posts/view/how-to-set-up-a-local-web-server-with-homebrew-on-mac-os-x-10-9
https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions
https://lukearmstrong.github.io/2016/12/setup-apache-mysql-php-homebrew-macos-sierra/
https://xdebug.org/docs/install
https://gist.github.com/vicgonvt/aba1e7008c83af6ab20916e427d4a52f
Installation d’Apache 2.4
PHP 7.1
brew install xdebug-osx
doc de launchctl
https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/launchctl.1.html
sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist
sudo cp -v /usr/local/Cellar/httpd/2.4.28/homebrew.mxcl.httpd.plist /Library/LaunchDaemons
sudo chown -v root:wheel /Library/LaunchDaemons/homebrew.mxcl.httpd.plist
sudo chmod -v 644 /Library/LaunchDaemons/homebrew.mxcl.httpd.plist
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.httpd.plist
Gestion des processus
http://www.funix.org/fr/unix/process.htm
sudo find / -name « httpd.conf »
brew remove –force –ignore-dependencies $(brew list)
http://blog.zedroot.org/uninstall-all-the-installed-packages-with-homebrew/
==> Pouring apr-1.6.2_1.high_sierra.bottle.tar.gz
echo ‘export PATH= »/usr/local/opt/apr/bin:$PATH »‘ >> ~/.bash_profile
==> Pouring openssl-1.0.2l.high_sierra.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/openssl/bin:$PATH »‘ >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
==> Pouring apr-util-1.6.0_1.high_sierra.bottle.tar.gz
This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple’s CLT package contains apr.
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/apr-util/bin:$PATH »‘ >> ~/.bash_profile
==> Installing httpd
DocumentRoot is /usr/local/var/www.
The default ports have been set in /usr/local/etc/httpd/httpd.conf to 8080 and in
/usr/local/etc/httpd/extra/httpd-ssl.conf to 8443 so that httpd can run without sudo.
To have launchd start httpd now and restart at login:
brew services start httpd
Or, if you don’t want/need a background service you can just run:
apachectl start
brew options php71
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php7_module /usr/local/opt/php71/libexec/apache2/libphp7.so
SetHandler application/x-httpd-php
Finally, check DirectoryIndex includes index.php
DirectoryIndex index.php index.html
The php.ini file can be found in:
/usr/local/etc/php/7.1/php.ini
✩✩✩✩ Extensions ✩✩✩✩
If you are having issues with custom extension compiling, ensure that you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:
PATH= »/usr/local/bin:$PATH »
PHP71 Extensions will always be compiled against this PHP. Please install them using –without-homebrew-php to enable compiling against system PHP.
✩✩✩✩ PHP CLI ✩✩✩✩
If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc, ~/.zshrc, ~/.profile or your shell’s equivalent configuration file:
export PATH= »$(brew –prefix homebrew/php/php71)/bin:$PATH »
✩✩✩✩ FPM ✩✩✩✩
To launch php-fpm on startup:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/opt/php71/homebrew.mxcl.php71.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php71.plist
The control script is located at /usr/local/opt/php71/sbin/php71-fpm
OS X 10.8 and newer come with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /usr/local/sbin is before /usr/sbin in your PATH:
PATH= »/usr/local/sbin:$PATH »
You may also need to edit the plist to use the correct « UserName ».
Please note that the plist was called ‘homebrew-php.josegonzalez.php71.plist’ in old versions of this formula.
With the release of macOS Sierra the Apache module is now not built by default. If you want to build it on your system you have to install php with the –with-httpd option. See brew options php71 for more details.
To have launchd start homebrew/php/php71 now and restart at login:
brew services start homebrew/php/php71
brew install homebrew/php/php71-xdebug
ServerName www.example.com:8080
AH00557: httpd: apr_sockaddr_info_get() failed for My-MacBook-Pro.local
AH00558: httpd: Could not reliably determine the server’s fully qualified
domain name, using 127.0.0.1. Set the ‘ServerName’ directive globally to
suppress this message
MacBook-Pro-de-Frederic-2:~ fredericaudon$ brew install php72 –with-httpd
==> Installing dependencies for php: apr, openssl, apr-util, argon2, aspell, autoconf, freetds, libpng, freetype, gettext, libffi, pcre, glib, gmp, icu4c, jpeg, libpq, libsodium, libzip, libtool, unixodbc, webp
==> Installing php dependency: apr
==> Downloading https://homebrew.bintray.com/bottles/apr-1.6.3.high_sierra.bottl
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/apr-1.6.3.high_sierra.bottle.tar.gz
==> Pouring apr-1.6.3.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple’s CLT package contains apr.
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/apr/bin:$PATH »‘ >> ~/.bash_profile
==> Summary
🍺 /usr/local/Cellar/apr/1.6.3: 60 files, 1.3MB
==> Installing php dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2o_2.high_sierr
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/openssl-1.0.2o_2.high_sierra.bottle.tar.gz
==> Pouring openssl-1.0.2o_2.high_sierra.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/openssl/bin:$PATH »‘ >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
==> Summary
🍺 /usr/local/Cellar/openssl/1.0.2o_2: 1,792 files, 12.3MB
==> Installing php dependency: apr-util
==> Downloading https://homebrew.bintray.com/bottles/apr-util-1.6.1_1.high_sierr
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/apr-util-1.6.1_1.high_sierra.bottle.tar.gz
==> Pouring apr-util-1.6.1_1.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple’s CLT package contains apr.
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/apr-util/bin:$PATH »‘ >> ~/.bash_profile
==> Summary
🍺 /usr/local/Cellar/apr-util/1.6.1_1: 54 files, 778.2KB
==> Installing php dependency: argon2
==> Downloading https://homebrew.bintray.com/bottles/argon2-20171227.high_sierra
==> Downloading from https://akamai.bintray.com/13/139741b1c18f60d815ef22066fcfd
######################################################################## 100.0%
==> Pouring argon2-20171227.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/argon2/20171227: 11 files, 590KB
==> Installing php dependency: aspell
==> Downloading https://homebrew.bintray.com/bottles/aspell-0.60.6.1_1.high_sier
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/aspell-0.60.6.1_1.high_sierra.bottle.tar.gz
==> Pouring aspell-0.60.6.1_1.high_sierra.bottle.tar.gz
==> Caveats
Installation of the ‘is’ (Icelandic) and ‘nb’ (Norwegian) dictionaries is
currently broken. They can be installed manually.
See: https://github.com/Homebrew/homebrew-core/issues/28074
==> Summary
🍺 /usr/local/Cellar/aspell/0.60.6.1_1: 267 files, 35.6MB
==> Installing php dependency: autoconf
==> Downloading https://homebrew.bintray.com/bottles/autoconf-2.69.high_sierra.b
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/autoconf-2.69.high_sierra.bottle.4.tar.gz
==> Pouring autoconf-2.69.high_sierra.bottle.4.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/autoconf
==> Summary
🍺 /usr/local/Cellar/autoconf/2.69: 71 files, 3.0MB
==> Installing php dependency: freetds
==> Downloading https://homebrew.bintray.com/bottles/freetds-1.00.92.high_sierra
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/freetds-1.00.92.high_sierra.bottle.tar.gz
==> Pouring freetds-1.00.92.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/freetds/1.00.92: 2,094 files, 11.9MB
==> Installing php dependency: libpng
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.34.high_sierra.b
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/libpng-1.6.34.high_sierra.bottle.tar.gz
==> Pouring libpng-1.6.34.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/libpng/1.6.34: 26 files, 1.2MB
==> Installing php dependency: freetype
==> Downloading https://homebrew.bintray.com/bottles/freetype-2.9.1.high_sierra.
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/freetype-2.9.1.high_sierra.bottle.tar.gz
==> Pouring freetype-2.9.1.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/freetype/2.9.1: 60 files, 2.6MB
==> Installing php dependency: gettext
==> Downloading https://homebrew.bintray.com/bottles/gettext-0.19.8.1.high_sierr
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/gettext-0.19.8.1.high_sierra.bottle.tar.gz
==> Pouring gettext-0.19.8.1.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD gettext library & some software gets confused if both are in the library path.
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/gettext/bin:$PATH »‘ >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/gettext/lib
CPPFLAGS: -I/usr/local/opt/gettext/include
==> Summary
🍺 /usr/local/Cellar/gettext/0.19.8.1: 1,935 files, 16.9MB
==> Installing php dependency: libffi
==> Downloading https://homebrew.bintray.com/bottles/libffi-3.2.1.high_sierra.bo
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/libffi-3.2.1.high_sierra.bottle.tar.gz
==> Pouring libffi-3.2.1.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because some formulae require a newer version of libffi.
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/libffi/lib
==> Summary
🍺 /usr/local/Cellar/libffi/3.2.1: 16 files, 297.0KB
==> Installing php dependency: pcre
==> Downloading https://homebrew.bintray.com/bottles/pcre-8.42.high_sierra.bottl
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/pcre-8.42.high_sierra.bottle.tar.gz
==> Pouring pcre-8.42.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/pcre/8.42: 204 files, 5.3MB
==> Installing php dependency: glib
==> Downloading https://homebrew.bintray.com/bottles/glib-2.56.1.high_sierra.bot
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/glib-2.56.1.high_sierra.bottle.tar.gz
==> Pouring glib-2.56.1.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/glib/2.56.1: 430 files, 23.7MB
==> Installing php dependency: gmp
==> Downloading https://homebrew.bintray.com/bottles/gmp-6.1.2_2.high_sierra.bot
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/gmp-6.1.2_2.high_sierra.bottle.tar.gz
==> Pouring gmp-6.1.2_2.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/gmp/6.1.2_2: 18 files, 3.1MB
==> Installing php dependency: icu4c
==> Downloading https://homebrew.bintray.com/bottles/icu4c-62.1.high_sierra.bott
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/icu4c-62.1.high_sierra.bottle.tar.gz
==> Pouring icu4c-62.1.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/icu4c/bin:$PATH »‘ >> ~/.bash_profile
echo ‘export PATH= »/usr/local/opt/icu4c/sbin:$PATH »‘ >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/icu4c/lib
CPPFLAGS: -I/usr/local/opt/icu4c/include
==> Summary
🍺 /usr/local/Cellar/icu4c/62.1: 250 files, 67.3MB
==> Installing php dependency: jpeg
==> Downloading https://homebrew.bintray.com/bottles/jpeg-9c.high_sierra.bottle.
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/jpeg-9c.high_sierra.bottle.tar.gz
==> Pouring jpeg-9c.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/jpeg/9c: 21 files, 724.5KB
==> Installing php dependency: libpq
==> Downloading https://homebrew.bintray.com/bottles/libpq-10.4.high_sierra.bott
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/libpq-10.4.high_sierra.bottle.tar.gz
==> Pouring libpq-10.4.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because conflicts with postgres formula.
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/libpq/bin:$PATH »‘ >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/libpq/lib
CPPFLAGS: -I/usr/local/opt/libpq/include
==> Summary
🍺 /usr/local/Cellar/libpq/10.4: 2,430 files, 26.9MB
==> Installing php dependency: libsodium
==> Downloading https://homebrew.bintray.com/bottles/libsodium-1.0.16.high_sierr
==> Downloading from https://akamai.bintray.com/fb/fbacd0565bf421dd62d5bd24f52e8
######################################################################## 100.0%
==> Pouring libsodium-1.0.16.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/libsodium/1.0.16: 71 files, 945.1KB
==> Installing php dependency: libzip
==> Downloading https://homebrew.bintray.com/bottles/libzip-1.5.1.high_sierra.bo
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/libzip-1.5.1.high_sierra.bottle.tar.gz
==> Pouring libzip-1.5.1.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/libzip/1.5.1: 134 files, 577KB
==> Installing php dependency: libtool
==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_1.high_sierra
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/libtool-2.4.6_1.high_sierra.bottle.tar.gz
==> Pouring libtool-2.4.6_1.high_sierra.bottle.tar.gz
==> Caveats
In order to prevent conflicts with Apple’s own libtool we have prepended a « g »
so, you have instead: glibtool and glibtoolize.
==> Summary
🍺 /usr/local/Cellar/libtool/2.4.6_1: 71 files, 3.7MB
==> Installing php dependency: unixodbc
==> Downloading https://homebrew.bintray.com/bottles/unixodbc-2.3.6.high_sierra.
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/unixodbc-2.3.6.high_sierra.bottle.tar.gz
==> Pouring unixodbc-2.3.6.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/unixodbc/2.3.6: 46 files, 1.8MB
==> Installing php dependency: webp
==> Downloading https://homebrew.bintray.com/bottles/webp-1.0.0.high_sierra.bott
Already downloaded: /Users/fredericaudon/Library/Caches/Homebrew/webp-1.0.0.high_sierra.bottle.tar.gz
==> Pouring webp-1.0.0.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/webp/1.0.0: 38 files, 2MB
Warning: php: this formula has no –with-httpd option so it will be ignored!
==> Installing php
==> Downloading https://homebrew.bintray.com/bottles/php-7.2.8.high_sierra.bottl
==> Downloading from https://akamai.bintray.com/a1/a1672a1e262cc8ba9091482ac16d8
######################################################################## 100.0%
==> Pouring php-7.2.8.high_sierra.bottle.tar.gz
==> /usr/local/Cellar/php/7.2.8/bin/pear config-set php_ini /usr/local/etc/php/7
==> /usr/local/Cellar/php/7.2.8/bin/pear config-set php_dir /usr/local/share/pea
==> /usr/local/Cellar/php/7.2.8/bin/pear config-set doc_dir /usr/local/share/pea
==> /usr/local/Cellar/php/7.2.8/bin/pear config-set ext_dir /usr/local/lib/php/p
==> /usr/local/Cellar/php/7.2.8/bin/pear config-set bin_dir /usr/local/opt/php/b
==> /usr/local/Cellar/php/7.2.8/bin/pear config-set data_dir /usr/local/share/pe
==> /usr/local/Cellar/php/7.2.8/bin/pear config-set cfg_dir /usr/local/share/pea
==> /usr/local/Cellar/php/7.2.8/bin/pear config-set www_dir /usr/local/share/pea
==> /usr/local/Cellar/php/7.2.8/bin/pear config-set man_dir /usr/local/share/man
==> /usr/local/Cellar/php/7.2.8/bin/pear config-set test_dir /usr/local/share/pe
==> /usr/local/Cellar/php/7.2.8/bin/pear config-set php_bin /usr/local/opt/php/b
==> /usr/local/Cellar/php/7.2.8/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.2/
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.2.8: 515 files, 79.1MB
==> Caveats
==> apr
This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple’s CLT package contains apr.
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/apr/bin:$PATH »‘ >> ~/.bash_profile
==> openssl
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/openssl/bin:$PATH »‘ >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
==> apr-util
This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple’s CLT package contains apr.
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/apr-util/bin:$PATH »‘ >> ~/.bash_profile
==> aspell
Installation of the ‘is’ (Icelandic) and ‘nb’ (Norwegian) dictionaries is
currently broken. They can be installed manually.
See: https://github.com/Homebrew/homebrew-core/issues/28074
==> autoconf
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/autoconf
==> gettext
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD gettext library & some software gets confused if both are in the library path.
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/gettext/bin:$PATH »‘ >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/gettext/lib
CPPFLAGS: -I/usr/local/opt/gettext/include
==> libffi
This formula is keg-only, which means it was not symlinked into /usr/local,
because some formulae require a newer version of libffi.
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/libffi/lib
==> icu4c
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/icu4c/bin:$PATH »‘ >> ~/.bash_profile
echo ‘export PATH= »/usr/local/opt/icu4c/sbin:$PATH »‘ >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/icu4c/lib
CPPFLAGS: -I/usr/local/opt/icu4c/include
==> libpq
This formula is keg-only, which means it was not symlinked into /usr/local,
because conflicts with postgres formula.
If you need to have this software first in your PATH run:
echo ‘export PATH= »/usr/local/opt/libpq/bin:$PATH »‘ >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/libpq/lib
CPPFLAGS: -I/usr/local/opt/libpq/include
==> libtool
In order to prevent conflicts with Apple’s own libtool we have prepended a « g »
so, you have instead: glibtool and glibtoolize.
==> php
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.2/
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
MacBook-Pro-de-Frederic-2:~ fredericaudon$