php@8.1 (deprecated)
Disable date: 2026-12-31
Install command:
brew install php@8.1General-purpose scripting language
License: PHP-3.01
Development: Pull requests
Formula JSON API: /api/formula/php@8.1.json
Formula code: php@8.1.rb on GitHub
Bottle (binary package) installation support provided for:
| macOS on Apple Silicon |
golden gate | ✅ |
|---|---|---|
| tahoe | ✅ | |
| sequoia | ✅ | |
| Linux | ARM64 | ✅ |
| x86_64 | ✅ |
Current versions:
| stable | ✅ | 8.1.34 |
Other versions:
| php@8.5 | 8.5.13 | General-purpose scripting language |
| php@8.4 | 8.4.28 | General-purpose scripting language |
| php@8.3 | 8.3.37 | General-purpose scripting language |
| php@8.2 | 8.2.36 | General-purpose scripting language |
Patches:
| https://github.com/Homebrew/homebrew-core/blob/main/Patches/php/openssl4-8.1.34.diff |
Keg-only because this is an alternate version of another formula.
Depends on:
| apr | 1.7.6 | Apache Portable Runtime library |
| apr-util | 1.6.6 | Companion library to apr, the Apache Portable Runtime library |
| argon2 | 20190702 | Password hashing library and CLI utility |
| aspell | 0.60.8.3 | Spell checker with better logic than ispell |
| autoconf | 2.73 | Automatic configure script builder |
| curl | 8.23.0 | Get a file from an HTTP, HTTPS or FTP server |
| freetds | 1.5.22 | Libraries to talk to Microsoft SQL Server and Sybase databases |
| gd | 2.3.3 | Graphics library to dynamically manipulate images |
| gmp | 6.3.0 | GNU multiple precision arithmetic library |
| icu4c@79 | 79.1 | C/C++ and Java libraries for Unicode and globalization |
| krb5 | 1.22.3 | Network authentication protocol |
| libpq | 19.0 | Postgres C API library |
| libsodium | 1.0.22 | NaCl networking and cryptography library |
| libzip | 1.12.1 | C library for reading, creating, and modifying zip archives |
| oniguruma | 6.9.10 | Regular expressions library |
| openldap | 2.7.2 | Open source suite of directory software |
| openssl@4 | 4.1.0 | Cryptography and SSL/TLS Toolkit |
| pcre2 | 10.49 | Perl compatible regular expressions library with a new API |
| sqlite | 3.54.1 | Command-line interface for SQLite |
| tidy-html5 | 5.8.0 | Granddaddy of HTML tools, with support for modern standards |
| unixodbc | 2.3.14 | ODBC 3 connectivity for UNIX |
| gettext | 1.0 | GNU internationalization (i18n) and localization (l10n) library |
Depends on when building from source:
| httpd | 2.4.71 | Apache HTTP server |
| pkgconf | 3.0.11 | Package compiler and linker metadata toolkit |
Uses from macOS: xz (build), bzip2, libedit, libffi, libxml2, libxslt
Binaries:
pear,
peardev,
pecl,
phar,
phar.phar,
php,
php-cgi,
php-config,
php-fpm,
phpdbg,
phpize
Service:
| Start now and at login: | brew services start php@8.1 |
| Run directly: | $HOMEBREW_PREFIX/opt/php@8.1/sbin/php-fpm --nodaemonize |
| To enable PHP in Apache add the following to httpd.conf and restart Apache: LoadModule php_module $HOMEBREW_PREFIX/opt/php@8.1/lib/httpd/modules/libphp.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: $HOMEBREW_PREFIX/etc/php/8.1/ |
Analytics:
| 30 days | 90 days | 365 days | |
|---|---|---|---|
| Installs | 289 | 907 | 14,309 |
Installs (--HEAD) | 0 | 3 | 35 |
| Installs on Request | 288 | 902 | 14,238 |
Installs on Request (--HEAD) | 0 | 3 | 35 |
| Build Errors | 11 |