User Tools

Site Tools


brew_install_php

brew install php

=⇒ Downloading https://formulae.brew.sh/api/formula.jws.json

=⇒ Downloading https://formulae.brew.sh/api/cask.jws.json

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/php/manifests/8.3.0

  1. 100.0%

=⇒ Fetching dependencies for php: apr, apr-util, argon2, aspell, libtool, unixodbc, freetds, highway, imath, openexr, webp, jpeg-xl, libvmaf, aom, libavif, gd, krb5, libpq, libzip, oniguruma and tidy-html5 =⇒ Downloading https://ghcr.io/v2/homebrew/core/apr/manifests/1.7.4

  1. 100.0%

=⇒ Fetching apr =⇒ Downloading https://ghcr.io/v2/homebrew/core/apr/blobs/sha256:81be61aa626fc6b6ec2b4448e6252da33997176a922cd4cdd0086ddd11aa3703

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/apr-util/manifests/1.6.3_1

  1. 100.0%

=⇒ Fetching apr-util =⇒ Downloading https://ghcr.io/v2/homebrew/core/apr-util/blobs/sha256:a59301c0e98b321c57fc3c8fac679a1e1bcdd5bce470fef60adc240f9c575674

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/argon2/manifests/20190702_1

  1. 100.0%

=⇒ Fetching argon2 =⇒ Downloading https://ghcr.io/v2/homebrew/core/argon2/blobs/sha256:00b61d421980e47df314b7b4ca74d3ed12ebf2eab0f35cb1013d0e397700c6bc

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/aspell/manifests/0.60.8-1

  1. 100.0%

=⇒ Fetching aspell =⇒ Downloading https://ghcr.io/v2/homebrew/core/aspell/blobs/sha256:b5314162b192388dce757d62f14976cad9e421e314a083ab25044cc439626df8

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/libtool/manifests/2.4.7-1

  1. 100.0%

=⇒ Fetching libtool =⇒ Downloading https://ghcr.io/v2/homebrew/core/libtool/blobs/sha256:47676ae503261483d5f1f35caa074efc416527bc471e25b0dc5c19bf588ed39f

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/unixodbc/manifests/2.3.12

  1. 100.0%

=⇒ Fetching unixodbc =⇒ Downloading https://ghcr.io/v2/homebrew/core/unixodbc/blobs/sha256:626e41606a2ff39516f08affe1c8e2f5396810a15adc7081b574a117e68a3bf1

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/freetds/manifests/1.4.10

  1. 100.0%

=⇒ Fetching freetds =⇒ Downloading https://ghcr.io/v2/homebrew/core/freetds/blobs/sha256:eb057539545529411ec00449559360e570c009398aa22574f9f98aae6ce9c19b

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/highway/manifests/1.0.7

  1. 100.0%

=⇒ Fetching highway =⇒ Downloading https://ghcr.io/v2/homebrew/core/highway/blobs/sha256:27680ef270fe253c96fb3248778bfd2b4747b666694d13d36eacba336e4ccbe3

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/imath/manifests/3.1.9

  1. 100.0%

=⇒ Fetching imath =⇒ Downloading https://ghcr.io/v2/homebrew/core/imath/blobs/sha256:75ddf0a1eb9650bc83c3270ce96ac1e73175ec3a97b75281bd280ede36a9e1fe

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/openexr/manifests/3.2.1

  1. 100.0%

=⇒ Fetching openexr =⇒ Downloading https://ghcr.io/v2/homebrew/core/openexr/blobs/sha256:89082b132cee8b5a74d69f97d60db99d3108f1f2f4b0d59ce994c3dcc6df7266

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/webp/manifests/1.3.2

  1. 100.0%

=⇒ Fetching webp =⇒ Downloading https://ghcr.io/v2/homebrew/core/webp/blobs/sha256:1acdc37723e07cf0acc3eade96fa8cc1e5e7c6e6176c84b61a0813cb07a61368

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/jpeg-xl/manifests/0.8.2_1-1

  1. 100.0%

=⇒ Fetching jpeg-xl =⇒ Downloading https://ghcr.io/v2/homebrew/core/jpeg-xl/blobs/sha256:1093ba2170cf9fe8da1d29beed93bd1fbd196de886a5d5b8827a9c4e256f5312

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/libvmaf/manifests/2.3.1-1

  1. 100.0%

=⇒ Fetching libvmaf =⇒ Downloading https://ghcr.io/v2/homebrew/core/libvmaf/blobs/sha256:c0e45e64bab728cac1eed86307cee8a91e1d83fa68a92b1d081b10cafaa8bcb5

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/aom/manifests/3.8.0

  1. 100.0%

=⇒ Fetching aom =⇒ Downloading https://ghcr.io/v2/homebrew/core/aom/blobs/sha256:641c6a30080e42660c171fbd22c707a20ad093688ebd1cecfe5f02fb97abe387

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/libavif/manifests/1.0.3

  1. 100.0%

=⇒ Fetching libavif =⇒ Downloading https://ghcr.io/v2/homebrew/core/libavif/blobs/sha256:cf45d85b5b049ea41e78d22e3c1c6efd421e9c73652654879df364472cca7614

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/gd/manifests/2.3.3_6

  1. 100.0%

=⇒ Fetching gd =⇒ Downloading https://ghcr.io/v2/homebrew/core/gd/blobs/sha256:7bc1099e53432209a4c5da106c8105e0f8e95728a6cc77438e2761c8b6fcf05b

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/krb5/manifests/1.21.2

  1. 100.0%

=⇒ Fetching krb5 =⇒ Downloading https://ghcr.io/v2/homebrew/core/krb5/blobs/sha256:20a39d385f0cdc34029de2e0c030fc0787940a7be69cdcaa9de6899170cbb731

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/libpq/manifests/16.1_1

  1. 100.0%

=⇒ Fetching libpq =⇒ Downloading https://ghcr.io/v2/homebrew/core/libpq/blobs/sha256:742fd801eb1bd4528ccd00c095ef74ace4013641d55f0f88db50045754572e97

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/libzip/manifests/1.10.1-1 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/1ef330823ec193afac90b408856a88dd361a328b9afc4f6b9695cb50d18d19c7–libzip-1.10.1-1.bottle_manifest.json =⇒ Downloading https://ghcr.io/v2/homebrew/core/libzip/manifests/1.10.1-1

  1. 100.0%

=⇒ Fetching libzip =⇒ Downloading https://ghcr.io/v2/homebrew/core/libzip/blobs/sha256:f782643b254f58ddf3830272c0221f5d35db84ebd4f3d4ef19894ca0c91648ad

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/oniguruma/manifests/6.9.9

  1. 100.0%

=⇒ Fetching oniguruma =⇒ Downloading https://ghcr.io/v2/homebrew/core/oniguruma/blobs/sha256:75f2ef5b5593401d265669503cff50cda1fc10dbe2750fc54c87cbe578211b58

  1. 100.0%

=⇒ Downloading https://ghcr.io/v2/homebrew/core/tidy-html5/manifests/5.8.0

  1. 100.0%

=⇒ Fetching tidy-html5 =⇒ Downloading https://ghcr.io/v2/homebrew/core/tidy-html5/blobs/sha256:dbae8d55a2a35e2245dea6ff6180eac37973514342d4a3895a82a5f43752972a

  1. 100.0%

=⇒ Fetching php =⇒ Downloading https://ghcr.io/v2/homebrew/core/php/blobs/sha256:92dd989cafcd75b36284ab156109843b7cd3928556b7b8a5bf581d568f0060ff

  1. 100.0%

=⇒ Installing dependencies for php: apr, apr-util, argon2, aspell, libtool, unixodbc, freetds, highway, imath, openexr, webp, jpeg-xl, libvmaf, aom, libavif, gd, krb5, libpq, libzip, oniguruma and tidy-html5 =⇒ Installing php dependency: apr =⇒ Downloading https://ghcr.io/v2/homebrew/core/apr/manifests/1.7.4 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/5cea0c08bd37febcd8cd169db1e67b7106cf42ff4165a1aadfbc2748d2a4058c–apr-1.7.4.bottle_manifest.json =⇒ Pouring apr–1.7.4.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/apr/1.7.4: 59 files, 1.4MB =⇒ Installing php dependency: apr-util =⇒ Downloading https://ghcr.io/v2/homebrew/core/apr-util/manifests/1.6.3_1 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/882503b5e82fa34d08932148f6a5a53179ac546c280d03dada41d245809d39e7–apr-util-1.6.3_1.bottle_manifest.json =⇒ Pouring apr-util–1.6.3_1.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/apr-util/1.6.3_1: 54 files, 872.9KB =⇒ Installing php dependency: argon2 =⇒ Downloading https://ghcr.io/v2/homebrew/core/argon2/manifests/20190702_1 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/1edde14bdb96d4a110df174fb14e59db91750d4b8d4834474e62450ae1ec81a5–argon2-20190702_1.bottle_manifest.json =⇒ Pouring argon2–20190702_1.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/argon2/20190702_1: 12 files, 667.5KB =⇒ Installing php dependency: aspell =⇒ Downloading https://ghcr.io/v2/homebrew/core/aspell/manifests/0.60.8-1 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/637f4cb043e2bb9c168ba9db4fb06cbfd7fe0e0b5c496d04df3f97489bec4e8b–aspell-0.60.8-1.bottle_manifest.json =⇒ Pouring aspell–0.60.8.sonoma.bottle.1.tar.gz 🍺 /usr/local/Cellar/aspell/0.60.8: 767 files, 322.7MB =⇒ Installing php dependency: libtool =⇒ Downloading https://ghcr.io/v2/homebrew/core/libtool/manifests/2.4.7-1 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/606e79b61b857bc4e83f71abf7afa8e087c4ad71539989e7066a4055439bf129–libtool-2.4.7-1.bottle_manifest.json =⇒ Pouring libtool–2.4.7.sonoma.bottle.1.tar.gz 🍺 /usr/local/Cellar/libtool/2.4.7: 75 files, 3.8MB =⇒ Installing php dependency: unixodbc =⇒ Downloading https://ghcr.io/v2/homebrew/core/unixodbc/manifests/2.3.12 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/f0a48ea379f8e4acc3dc9d88ec4ce4e354b4437d2104efee3399b892b79d55ac–unixodbc-2.3.12.bottle_manifest.json =⇒ Pouring unixodbc–2.3.12.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/unixodbc/2.3.12: 47 files, 2.1MB =⇒ Installing php dependency: freetds =⇒ Downloading https://ghcr.io/v2/homebrew/core/freetds/manifests/1.4.10 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/e3ffed9bf57cddf590b130d4ee815ce234fa0bc7d583c8c39d511251b4de281d–freetds-1.4.10.bottle_manifest.json =⇒ Pouring freetds–1.4.10.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/freetds/1.4.10: 1,418 files, 15.7MB =⇒ Installing php dependency: highway =⇒ Downloading https://ghcr.io/v2/homebrew/core/highway/manifests/1.0.7 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/310f2f4bf70e1090998016b5441a741a6cf7f895932c5b664e8fb74f236e5401–highway-1.0.7.bottle_manifest.json =⇒ Pouring highway–1.0.7.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/highway/1.0.7: 65 files, 5.6MB =⇒ Installing php dependency: imath =⇒ Downloading https://ghcr.io/v2/homebrew/core/imath/manifests/3.1.9 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/a1667dc9df99f63d77a45c556d56932eab576af5c24e955461c65629589d7628–imath-3.1.9.bottle_manifest.json =⇒ Pouring imath–3.1.9.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/imath/3.1.9: 49 files, 931.4KB =⇒ Installing php dependency: openexr =⇒ Downloading https://ghcr.io/v2/homebrew/core/openexr/manifests/3.2.1 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/5b8bbf02d04feb2a6e9c578e606f8aeacce2f261c79900426f7bc1d2b0c1717e–openexr-3.2.1.bottle_manifest.json =⇒ Pouring openexr–3.2.1.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/openexr/3.2.1: 204 files, 7.6MB =⇒ Installing php dependency: webp =⇒ Downloading https://ghcr.io/v2/homebrew/core/webp/manifests/1.3.2 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/952907f186b4d32b3e43b7af1c9e93bd484f9b61db1adb22b5fb4a5361cdd0e9–webp-1.3.2.bottle_manifest.json =⇒ Pouring webp–1.3.2.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/webp/1.3.2: 63 files, 2.5MB =⇒ Installing php dependency: jpeg-xl =⇒ Downloading https://ghcr.io/v2/homebrew/core/jpeg-xl/manifests/0.8.2_1-1 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/9ac42aa48e4d7c592c96fc42c145387ba2229a073591c5a92c1a094f779afc3a–jpeg-xl-0.8.2_1-1.bottle_manifest.json =⇒ Pouring jpeg-xl–0.8.2_1.sonoma.bottle.1.tar.gz 🍺 /usr/local/Cellar/jpeg-xl/0.8.2_1: 43 files, 21.8MB =⇒ Installing php dependency: libvmaf =⇒ Downloading https://ghcr.io/v2/homebrew/core/libvmaf/manifests/2.3.1-1 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/2c60c744c64777df8cb83e3ae4115190f469b9e67e7d671d413220c0f4f3df55–libvmaf-2.3.1-1.bottle_manifest.json =⇒ Pouring libvmaf–2.3.1.sonoma.bottle.1.tar.gz 🍺 /usr/local/Cellar/libvmaf/2.3.1: 234 files, 7.2MB =⇒ Installing php dependency: aom =⇒ Downloading https://ghcr.io/v2/homebrew/core/aom/manifests/3.8.0 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/dfcc96b72b82ea2a86a94a9b6348b3fe1084e7459818a04dd86a321d7f8908e1–aom-3.8.0.bottle_manifest.json =⇒ Pouring aom–3.8.0.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/aom/3.8.0: 23 files, 13.0MB =⇒ Installing php dependency: libavif =⇒ Downloading https://ghcr.io/v2/homebrew/core/libavif/manifests/1.0.3 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/7aeab8a2a1971540f9a21f6189d69157edfc2728d3da8263e9ebda12ec517986–libavif-1.0.3.bottle_manifest.json =⇒ Pouring libavif–1.0.3.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/libavif/1.0.3: 19 files, 497.6KB =⇒ Installing php dependency: gd =⇒ Downloading https://ghcr.io/v2/homebrew/core/gd/manifests/2.3.3_6 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/1f63d9efd8c74faa4477bd8b8a3970abd38e51230ed052918bb6f3715aab8b61–gd-2.3.3_6.bottle_manifest.json =⇒ Pouring gd–2.3.3_6.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/gd/2.3.3_6: 33 files, 1.3MB =⇒ Installing php dependency: krb5 =⇒ Downloading https://ghcr.io/v2/homebrew/core/krb5/manifests/1.21.2 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/1dac813e15dc58f7f64511565951ee43912a4a82b355448e23600e07b1b7107c–krb5-1.21.2.bottle_manifest.json =⇒ Pouring krb5–1.21.2.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/krb5/1.21.2: 162 files, 4.9MB =⇒ Installing php dependency: libpq =⇒ Downloading https://ghcr.io/v2/homebrew/core/libpq/manifests/16.1_1 Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/019fad1ad590703791b5a39d3460fa4c5c23d4df2506f22f99c6679c03eb8336–libpq-16.1_1.bottle_manifest.json

=⇒ Pouring libpq–16.1_1.sonoma.bottle.tar.gz

🍺 /usr/local/Cellar/libpq/16.1_1: 2,380 files, 29.3MB

=⇒ Installing php dependency: libzip

=⇒ Downloading https://ghcr.io/v2/homebrew/core/libzip/manifests/1.10.1-1

Already downloaded:

/Users/USER/Library/Caches/Homebrew/downloads/1ef330823ec193afac90b408856a88dd361a328b9afc4f6b9695cb50d18d19c7–libzip-1.10.1-1.bottle_manifest.json

=⇒ Pouring libzip–1.10.1.sonoma.bottle.1.tar.gz

🍺 /usr/local/Cellar/libzip/1.10.1: 154 files, 833.7KB

=⇒ Installing php dependency: oniguruma

=⇒ Downloading https://ghcr.io/v2/homebrew/core/oniguruma/manifests/6.9.9

Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/35140c4d3995b75388bed026ef6d0acbb4d6076047cdcd895bfd996c0c8d6487–oniguruma-6.9.9.bottle_manifest.json

=⇒ Pouring oniguruma–6.9.9.sonoma.bottle.tar.gz 🍺 /usr/local/Cellar/oniguruma/6.9.9: 14 files, 1.4MB

=⇒ Installing php dependency: tidy-html5

=⇒ Downloading https://ghcr.io/v2/homebrew/core/tidy-html5/manifests/5.8.0

Already downloaded: /Users/USER/Library/Caches/Homebrew/downloads/9c3d95eb5772f016b6bafe57a1129f7f2e2304ab934af96410b2c0739128ce48–tidy-html5-5.8.0.bottle_manifest.json

=⇒ Pouring tidy-html5–5.8.0.sonoma.bottle.tar.gz

🍺 /usr/local/Cellar/tidy-html5/5.8.0: 14 files, 2.9MB

=⇒ Installing php

=⇒ Pouring php–8.3.0.sonoma.bottle.tar.gz

=⇒ /usr/local/Cellar/php/8.3.0/bin/pear config-set php_ini /usr/local/etc/php/8.3/php.ini system

=⇒ /usr/local/Cellar/php/8.3.0/bin/pear config-set php_dir /usr/local/share/pear system

=⇒ /usr/local/Cellar/php/8.3.0/bin/pear config-set doc_dir /usr/local/share/pear/doc system

=⇒ /usr/local/Cellar/php/8.3.0/bin/pear config-set ext_dir /usr/local/lib/php/pecl/20230831 system

=⇒ /usr/local/Cellar/php/8.3.0/bin/pear config-set bin_dir /usr/local/opt/php/bin system

=⇒ /usr/local/Cellar/php/8.3.0/bin/pear config-set data_dir /usr/local/share/pear/data system

=⇒ /usr/local/Cellar/php/8.3.0/bin/pear config-set cfg_dir /usr/local/share/pear/cfg system

=⇒ /usr/local/Cellar/php/8.3.0/bin/pear config-set www_dir /usr/local/share/pear/htdocs system

=⇒ /usr/local/Cellar/php/8.3.0/bin/pear config-set man_dir /usr/local/share/man system

=⇒ /usr/local/Cellar/php/8.3.0/bin/pear config-set test_dir /usr/local/share/pear/test system

=⇒ /usr/local/Cellar/php/8.3.0/bin/pear config-set php_bin /usr/local/opt/php/bin/php system

=⇒ /usr/local/Cellar/php/8.3.0/bin/pear update-channels

=⇒ Caveats

To enable PHP in Apache add the following to httpd.conf and restart Apache:

   LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so

   
       SetHandler application/x-httpd-php
   

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/8.3/

To 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:

 /usr/local/opt/php/sbin/php-fpm --nodaemonize

=⇒ Summary

🍺 /usr/local/Cellar/php/8.3.0: 523 files, 86.8MB

=⇒ Running `brew cleanup php`…

Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.

Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

=⇒ Caveats

=⇒ php

To enable PHP in Apache add the following to httpd.conf and restart Apache:

   LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so

   
       SetHandler application/x-httpd-php
   

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/8.3/

To 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:

 /usr/local/opt/php/sbin/php-fpm --nodaemonize

brew_install_php.txt · Last modified: 2024/04/28 03:53 (external edit)