mlocati / install-php-extensions
Easily install PHP extensions
Package info
github.com/mlocati/install-php-extensions
Type:project
pkg:composer/mlocati/install-php-extensions
Requires
- php: >=5.5 <8.7
- ext-json: *
- composer/semver: ^3.4
Requires (Dev)
- ext-phar: *
- ext-zip: *
- mockery/mockery: ^0.9.11 | ^1.6.15
- phpunit/phpunit: ^4.8.36 | ^6.5.14 | ^9.6.38
- psr/log: ^1 | ^2 | ^3
Suggests
- psr/log: Allows custom logging
Provides
None
Conflicts
None
Replaces
None
README
Warning
IPE is still in alpha: its options, its behavior and the library API may change without notice, and some extensions may not install correctly. For production use, consider docker-php-extension-installer for the time being.
install-php-extensions (IPE) installs PHP extensions with a single command: it chooses a version of the extensions that is compatible with your PHP, installs the system packages they need, compiles them and enables them.
It works on:
- the official Docker PHP images, both the Debian and the Alpine variants;
- Debian 9 (Stretch) or later, with PHP installed from the Debian packages or from the repository of Ondřej Surý;
- Ubuntu 16.04 or later, with PHP installed from the Ubuntu packages or from the packages of Ondřej Surý (his PPA or his repository);
- Alpine Linux 3.15 or later, with PHP installed from the Alpine packages;
- Wolfi and the Chainguard images based on it, with PHP installed from the Wolfi packages (see Wolfi);
- Enterprise Linux 8 or later (AlmaLinux, CentOS Stream, Oracle Linux, Red Hat Enterprise Linux, Rocky Linux), with PHP installed from the system packages (including their module streams) or from the packages of Remi (see Optional repositories on Enterprise Linux);
- Fedora, with PHP installed from the Fedora packages;
- Amazon Linux 2023, with PHP installed from the Amazon Linux packages;
- macOS, with PHP installed with Homebrew (see macOS).
When PHP has been installed by the system packager (APT, APK, DNF or Homebrew), IPE may install the extensions from its packages whenever they are available (see the --system-packages option).
install-php-extensions gd xdebug
Getting IPE
IPE is distributed as a PHAR file attached to the releases, in three variants:
install-php-extensions: not compressed;install-php-extensions-gz: smaller, but it requires the zlib PHP extension (which should be always available in the official Docker PHP images);install-php-extensions-debug: not compressed, and with the original PHP source code, so that the error messages point to the right lines of the source files.
All the PHAR files are also available in the ghcr.io/mlocati/install-php-extensions Docker image.
IPE requires the phar PHP extension.
It's always available in the official Docker PHP images and with the Debian and Ubuntu packages, but the Alpine packages provide it separately: install the package with the name of the PHP package followed by -phar (for example, apk add php84-phar).
Also, on Alpine the php command is available only when PHP is installed with the default PHP package of the Alpine version (for example, php85 for Alpine 3.24).
With the other PHP packages, you have to run IPE with the PHP command of that package: for example, with php84 you have to use php84 /usr/local/bin/install-php-extensions gd xdebug.
Downloading IPE with ADD
FROM php:8.4-cli ADD --chmod=0755 https://github.com/mlocati/install-php-extensions/releases/latest/download/install-php-extensions /usr/local/bin/ RUN install-php-extensions gd xdebug
Downloading IPE with curl
FROM php:8.4-cli RUN curl -sSLf \ -o /usr/local/bin/install-php-extensions \ https://github.com/mlocati/install-php-extensions/releases/latest/download/install-php-extensions-gz && \ chmod +x /usr/local/bin/install-php-extensions && \ install-php-extensions gd xdebug
The same commands work outside Docker too (IPE must be run as root, since it installs system packages).
Copying IPE from the Docker image
FROM php:8.4-cli COPY --from=ghcr.io/mlocati/install-php-extensions:latest /usr/bin/install-php-extensions /usr/local/bin/ RUN install-php-extensions gd xdebug
The image is available for all the platforms of the official Docker PHP images.
It also contains the compressed variant, /usr/bin/install-php-extensions-gz (which requires the zlib PHP extension):
COPY --from=ghcr.io/mlocati/install-php-extensions:latest /usr/bin/install-php-extensions-gz /usr/local/bin/install-php-extensions
And the variant for debugging, /usr/bin/install-php-extensions-debug.
Using a specific version of IPE
The URLs and the image above provide the most recent release of IPE, so a new release may change what your builds do.
To always use the same version, replace latest/download with download/<version>, where <version> is the version of a release (for example 0.0.1):
ADD --chmod=0755 https://github.com/mlocati/install-php-extensions/releases/download/0.0.1/install-php-extensions /usr/local/bin/
Likewise, replace the latest tag of the Docker image with the version (for example 0.0.1).
The image is also tagged with the major and minor versions (for example 1.2 for the most recent 1.2.x release) and, starting from version 1, with the major version (for example 1).
COPY --from=ghcr.io/mlocati/install-php-extensions:0.0.1 /usr/bin/install-php-extensions /usr/local/bin/
Pre-releases (like 1.0.0-beta1) are never provided by the latest URLs and tags: you can use them only by specifying their version.
Building IPE
You can also build the PHAR files from the source code (you need PHP with the phar.readonly setting turned off, which the build-phar Composer script does for you):
git clone https://github.com/mlocati/install-php-extensions.git cd install-php-extensions composer install --no-dev # Not compressed composer run-script build-phar -- install-php-extensions # Compressed with gzip composer run-script build-phar -- --compress=gz install-php-extensions-gz # With the original PHP source code, for debugging composer run-script build-phar -- --no-strip install-php-extensions-debug
Specifying the extensions
Every argument identifies an extension to be installed:
| Argument | Example | Description |
|---|---|---|
| Handle | xdebug |
One of the supported PHP extensions: depending on the extension and on the PHP version, IPE takes it from the PHP source code, from Packagist/Composer or from PECL |
| Composer package | vendor/name |
A PHP extension published as a Composer package on Packagist (like the ones installed by PIE) |
| PHP bundled extension | php/name |
One of the supported PHP extensions bundled in the PHP source code (in some or all the PHP versions): it's the same as its handle (for example, php/imap is the same as imap) |
| GitHub shortcut | gh:organization/repository@ref |
The source code of a GitHub repository, where ref is a commit, a tag or a branch |
| GitLab shortcut | gl:group/project@ref |
The source code of a repository on gitlab.com (also in subgroups, like gl:group/subgroup/project@ref), where ref is a commit, a tag or a branch |
| Codeberg shortcut | cb:owner/repository@ref |
The source code of a Codeberg repository, where ref is a commit, a tag or a branch |
| Bitbucket shortcut | bb:workspace/repository@ref |
The source code of a Bitbucket repository, where ref is a commit, a tag or a branch |
| URL | https://example.com/extension.tar.gz |
An archive containing the source code of the extension |
| Local directory | ./path/to/extension |
A directory containing the source code of the extension (the path must start with /, ./ or ../) |
If the source code is not in the root directory of the repository or of the archive, append # followed by its path, for example:
gh:organization/repository@main#path/to/extensionhttps://example.com/archive.tar.gz#path/to/extension
Specifying the versions
By default, IPE installs the most recent stable version of the extensions compatible with your PHP (some extensions use a different default for some PHP versions).
To choose a version of an extension specified with its handle or with its Composer package name, append : followed by the version requirements, using the Composer syntax:
Warning
The arguments containing spaces or characters like *, <, > and | must be quoted, for example 'xdebug:3.3.*' or 'xdebug:>=3.2 <3.4'.
| Argument | Installed version |
|---|---|
xdebug:^3.3 |
The most recent 3.x version, starting from 3.3.0 |
xdebug:~3.3.0 or xdebug:3.3.* |
The most recent 3.3.x version |
xdebug:3.3.2 |
Exactly 3.3.2 |
xdebug:3.4.0beta1 |
Exactly 3.4.0beta1 |
xdebug:@beta |
The most recent version whose stability is beta or better |
xdebug:^3.4@RC |
The most recent 3.x version, starting from 3.4.0, whose stability is RC or better |
Please remark that:
- the stability levels are, from the lowest to the highest,
dev,alpha,beta,RCandstable: without@, only stable versions are considered - a version without operators is an exact version:
xdebug:3.3means 3.3.0, not the most recent 3.3.x version - exact versions are installed whatever their stability, and without checking if they are compatible with your PHP
- for the extensions bundled with PHP, the version is the one of PHP: if it doesn't satisfy the requirements, IPE looks for the extension in the other sources
Supported PHP extensions
The extensions marked with ⓘ have some notes. Below the handles there are the Composer package names that can be used to specify the extensions.
| Extension | PHP 8.6 | PHP 8.5 | PHP 8.4 | PHP 8.3 | PHP 8.2 | PHP 8.1 | PHP 8.0 | PHP 7.4 | PHP 7.3 | PHP 7.2 | PHP 7.1 | PHP 7.0 | PHP 5.6 | PHP 5.5 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| amqpⓘ php-amqp/php-amqp |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| apcu apcu/apcu |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| apcu_bc | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||||
| ast nikic/php-ast |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| bcmath php/bcmath |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| bitset pecl/bitset |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| blackfireⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| brotli kjdev/brotli |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| bz2 php/bz2 |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| calendar php/calendar |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| cassandraⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| cmark | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||||
| csv girgias/csv |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
| curl php/curl |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| dba php/dba |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| ddtraceⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| decimal php-decimal/ext-decimal |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| dom php/dom |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| ds php-ds/ext-ds |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| ecma_intlⓘ | ✓ | ✓ | ||||||||||||
| enchantⓘ php/enchant |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| ev osmanov/pecl-ev |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| event osmanov/pecl-event |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| excimer wikimedia/excimer |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| exif php/exif |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| ffi php/ffi |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
| fileinfo php/fileinfo |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| ftp php/ftp |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| gdⓘ php/gd |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| gearman | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| geoipⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| geosⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| geospatial php-geospatial/geospatial |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| gettext php/gettext |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| gmagick | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| gmp php/gmp |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| gnupg | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| grpc | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| http m6w6/ext-http |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| iconv php/iconv |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| igbinary igbinary/igbinary |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| imagick imagick/imagick |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| imapⓘ php/imap |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| inotifyⓘ arnaud-lb/inotify |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| interbaseⓘ php/interbase |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||||
| intl php/intl |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| ion | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||||
| ioncube_loader | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| ip2location ip2location/ip2location-pie |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| jsmin | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| json_post m6w6/ext-json_post |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| jsonpath supermetrics/jsonpath |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
| judyⓘ orieg/judy |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| ldap php/ldap |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| luasandboxⓘ wikimedia/luasandbox |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| lz4ⓘ kjdev/lz4 |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| lzf pecl/lzf |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| mailparse pecl/mailparse |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| maxminddb | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| mbstring php/mbstring |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| mcryptⓘ pecl/mcrypt php/mcrypt |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| md4c | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| memcache | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| memcached php-memcached/php-memcached |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| memprofⓘ arnaud-lb/memprof |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| mongo | ✓ | ✓ | ||||||||||||
| mongodb mongodb/mongodb-extension |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| mosquittoⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| msgpack msgpack/msgpack-php |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| mssql php/mssql |
✓ | ✓ | ||||||||||||
| mysql php/mysql |
✓ | ✓ | ||||||||||||
| mysqli php/mysqli |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| mysqlnd php/mysqlnd |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| newrelicⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| nsq | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| oauth | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| oci8ⓘ oci8/oci8 php/oci8 |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| odbc php/odbc |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| opcache php/opcache |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| opencensus | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
| openssl php/openssl |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| openswoole openswoole/ext-openswoole |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| opentelemetry open-telemetry/ext-opentelemetry |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| operatorⓘ | ✓ | ✓ | ✓ | ✓ | ||||||||||
| parallelⓘ pecl/parallel |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| parleⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| pcntl php/pcntl |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| pcov pecl/pcov |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| pdo php/pdo |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| pdo_dblib php/pdo_dblib |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| pdo_firebirdⓘ php/pdo_firebird |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| pdo_mysql php/pdo_mysql |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| pdo_ociⓘ pecl/pdo_oci php/pdo_oci |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| pdo_odbc php/pdo_odbc |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| pdo_pgsql php/pdo_pgsql |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| pdo_snowflakeⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| pdo_sqlsrvⓘ microsoft/pdo_sqlsrv |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| pgsql php/pgsql |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| phalcon phalcon/cphalcon |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
| php_trieⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| phpyⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||||
| pkcs11 gamringer/pkcs11 |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| posix php/posix |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| pq m6w6/ext-pq |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| propro | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| protobuf | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| pspellⓘ php/pspell |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| psr | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| pthreadsⓘ | ✓ | ✓ | ✓ | |||||||||||
| raphf m6w6/ext-raphf |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| rdkafkaⓘ rdkafka/rdkafka |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| recodeⓘ php/recode |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||||
| redis phpredis/phpredis |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| relayⓘ cachewerk/ext-relay |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
| rrd | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| saxonⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| seasclick | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| seaslog | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| session php/session |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| shmop php/shmop |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| simdjsonⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| simplexml php/simplexml |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| smbclient | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| snappy kjdev/snappy |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| snmpⓘ php/snmp |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| snuffleupagusⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| soap php/soap |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| sockets php/sockets |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| sodiumⓘ php/sodium |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| solr pecl/solr |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| sourceguardian | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| spx noisebynorthwest/php-spx |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| sqlsrvⓘ microsoft/sqlsrv |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| ssh2 pecl/ssh2 |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| statgrabⓘ iliaal/statgrab |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| stomp | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| swooleⓘ swoole/swoole |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| sybase_ct php/sybase_ct |
✓ | ✓ | ||||||||||||
| sync | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| sysvmsg php/sysvmsg |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| sysvsem php/sysvsem |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| sysvshm php/sysvshm |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| tensor | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
| tidewaysⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| tidy php/tidy |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| timezonedb pecl/timezonedb |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| tokenizer php/tokenizer |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| translit derickr/translit |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| uopz krakjoe/uopz |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| uploadprogress | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| uuid pecl/uuid |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| uv amphp/uv |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| v8jsⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||||
| vipsⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| vld derickr/vld |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| wddx php/wddx |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||||
| wikidiff2ⓘ wikimedia/wikidiff2 |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| xattrⓘ pecl/xattr |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| xdebug xdebug/xdebug |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| xdiff pecl/xdiff |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| xhprof | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| xlswriter viest/xlswriter |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| xml php/xml |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| xmldiff pecl/xml-xmldiff |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| xmlreader php/xmlreader |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| xmlrpc php/xmlrpc |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| xmlwriter php/xmlwriter |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| xpassⓘ remi/xpass |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||||
| xsl php/xsl |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| yac laruence/yac |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| yajl_streamⓘ vlydev/yajl-stream |
✓ | ✓ | ✓ | ✓ | ||||||||||
| yaml pecl/yaml |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| yar laruence/yar |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| zephir_parser | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| zip pecl/zip php/zip |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| zmq | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| zookeeperⓘ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
| zstd kjdev/zstd |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Number of supported extensions: 178
Command line options
These options apply to all the extensions (the options of specific extensions are listed in the extension notes):
| Option | Description | Default |
|---|---|---|
--php[=]value |
The php command (or the path of the PHP CLI binary) for which the extensions should be installed | the PHP running install-php-extensions |
--from-composer-json[=value] |
Also install the extensions listed in the require and require-dev sections of a composer.json file | composer.json in the current directory |
--from-composer-lock[=value] |
Also install the extensions required by the project and by its dependencies, as listed in a composer.lock file | composer.lock in the current directory |
--no-dev |
Ignore the development requirements of the project in --from-composer-json and --from-composer-lock | |
--show-options |
Show the options that can be specified for the extensions (including the ones declared by their source code), without installing them | |
--ignore-unknown-extensions |
Ignore unknown extensions instead of aborting | |
--unsupported-extensions[=]<abort|force|skip> |
What to do with extensions that are known not to work in the current environment. | abort |
--system-packages[=]<auto|never|only> |
When PHP has been installed by the system packager (APT, APK, DNF or Homebrew), install the extensions from its packages: when available (auto), never, or only from them (only). | auto |
--build-type[=]<optimized|with-symbols|debug> |
How to compile the extensions: optimized (debug symbols stripped), with-symbols (optimized, keeping the debug symbols), debug (no optimizations, with debug symbols) | optimized |
--cpus[=]value |
Number of parallel processors to be used while compiling (0: all the available ones) | all the available ones |
--git-submodules |
Fetch the git submodules missing from the source code of the extensions | |
--skip-check |
Don't check that PHP loads the extensions correctly before enabling them | |
--dont-enable |
Disable the extensions at the end of the installation (they can be enabled later with --enable) | |
--enable[=]value |
Enable the extension loaded by this ini file, by uncommenting its extension= and zend_extension= lines, or with phpenmod for the files in the mods-available directory of Debian and Ubuntu (can be specified multiple times) | |
--disable[=]value |
Disable the extension loaded by this ini file, by commenting out its extension= and zend_extension= lines, or with phpdismod for the files in the mods-available directory of Debian and Ubuntu (can be specified multiple times) | |
--ini-basename[=]value |
The name of the ini files that enable the extensions (without .ini): use the {priority} and {name} placeholders, or compat for the names used by the official Docker PHP images (see https://github.com/mlocati/install-php-extensions#names-of-the-ini-files) | compat in the official Docker PHP images, {priority}-{name} otherwise |
--keep-systempackager-cache[=]<yes|no> |
Keep the system packager (APT, APK, DNF or Homebrew) cache after installing PHP extensions | no in the official Docker PHP images, yes otherwise |
--apt-debian-fix-archived[=]<yes|no> |
Update the APT repositories for archived Debian systems | yes in the official Docker PHP images, no otherwise |
--apt-debian-archiveurl-default[=]value |
The URL for APT for archived Debian systems | http://archive.debian.org/debian |
--apt-debian-archiveurl-security[=]value |
The security URL for APT for archived Debian systems | http://archive.debian.org/debian-security |
--apt-debian-archiveurl-updates[=]value |
The updates URL for APT for archived Debian systems | http://archive.debian.org/debian |
--no-proxy |
Don't use the proxy configured in the HTTP_PROXY (or http_proxy) environment variable | |
--download-insecure |
Don't verify the TLS certificates of the servers when downloading files | |
--download-retry[=]value |
How many times a failed download should be retried | 0 |
--download-delay[=]value |
The number of seconds to wait before retrying a failed download | 5 |
--fix-letsencrypt[=]<yes|no> |
Fix the root CA certificate of Let's Encrypt on old systems | yes in the official Docker PHP images, no otherwise |
--cache-dir[=]value |
The path to an existing writable directory for dowloaded files cache | |
--cache-maxage[=]value |
The maximum age of cached files (e.g. '30' or '30s' for 30 seconds, '8h' for 8 hours, '7d' for 7 days). With 0 they never expire, so new versions of the extensions won't be detected | 0 |
--temp-dir[=]value |
The path to an existing writable directory where temporary files should be stored | |
--verbose |
Print debug information | |
--save-report-to[=]value |
Write to this file a JSON report of what has been installed, and how | |
--save-persistent-packages-to[=]value |
Write to this file the space-separated list of the system packages that have been installed and kept after the installation | |
--save-volatile-packages-to[=]value |
Write to this file the space-separated list of the system packages that have been installed and removed after the installation | |
--install-composer |
Install Composer | |
--composer-path[=]value |
The directory (or full path) where Composer should be installed (must be specified on Windows) | |
--composer-version[=]value |
The Composer version to be installed (stable, 1, 2.2, 2, 2.9.1, ...) | stable |
Options of the extensions
The options of the extensions are specified with --<handle>:<option>[=<value>] (or --<vendor>/<name>:<option>[=<value>] for the extensions specified with their Composer package).
For the extensions specified with a URL or a directory, use the name declared in their package.xml or composer.json (for example install-php-extensions gh:krakjoe/apcu@master --apcu:enable-apcu-debug): without these files, they don't accept options.
Besides the options declared by IPE (listed in the extension notes), the extensions accept the configure options declared by their source code (in package.xml or composer.json), which may change from one version to another.
The configure options are accepted in their opposite form too: for example --swoole:without-swoole-ssh2 is the same as --swoole:with-swoole-ssh2=no.
--show-options lists all of them, without installing anything:
install-php-extensions --show-options redis:^6.3
For every option, it shows its description and its default value.
Names of the ini files
--ini-basename sets the name of the ini files that enable the extensions (without .ini), with these placeholders:
{priority}: the priority of the extension, with two digits from 00 to 99 (80 for most extensions), so that the extensions are loaded in the right order{name}: the name of the extension
Each placeholder must be used once, {priority} before {name}.
The other characters can be letters, digits, _, - and ., but the name can't start or end with a dot.
For example, with the default {priority}-{name} the calendar extension is enabled by 80-calendar.ini.
In the official Docker PHP images the default is compat: the ini files are named like the ones created by docker-php-ext-enable (docker-php-ext-<name>.ini), or xx-php-ext-<name>.ini for the extensions that must be loaded after the others.
Extension notes
Some extensions have limitations, or specific command line options:
amqp
Not available on:
- Ubuntu 14.04 (the version of the librabbitmq library of this system is too old)
- Amazon Linux 2023 (this system does not provide the librabbitmq library)
blackfire
Not available on:
- Amazon Linux 2023 with PHP 5 (the probe for PHP 5 requires glibc 2.33 or older)
- Debian 12 to 15 with PHP 5 (the probe for PHP 5 requires glibc 2.33 or older)
- Enterprise Linux 9 to 10 with PHP 5 (the probe for PHP 5 requires glibc 2.33 or older)
- Fedora with PHP 5 (the probe for PHP 5 requires glibc 2.33 or older)
- Ubuntu 22.04 to 26.10 with PHP 5 (the probe for PHP 5 requires glibc 2.33 or older)
cassandra
Not available on:
- Debian 8 to 9 (the extension can't be compiled with the compiler or the libraries of this system)
- Wolfi and Chainguard (this system doesn't provide the Cassandra driver)
ddtrace
Not available on:
- Debian 8 (the extension can't be installed on this system)
- macOS (Datadog doesn't provide the extension for this system)
Command line options:
| Option | Description | Default |
|---|---|---|
--ddtrace:enable-appsec |
Enable the application security module | |
--ddtrace:enable-profiling |
Enable the profiling module |
ecma_intl
Not available on:
- Debian 10 to 11 (the extension is not compatible with the version of the ICU library of this system)
- Debian 13 (the extension is not compatible with the version of the ICU library of this system)
- Alpine 3.22 to 3.24 (the extension is not compatible with the version of the ICU library of this system)
- Enterprise Linux 8 to 9 (the extension is not compatible with the version of the ICU library of this system)
- Amazon Linux 2023 (the extension is not compatible with the version of the ICU library of this system)
- Wolfi and Chainguard (the extension is not compatible with the version of the ICU library of this system)
enchant
Not available on:
- macOS with PHP 5 (Homebrew doesn't provide enchant 1)
- macOS with PHP 7 (Homebrew doesn't provide enchant 1)
- Wolfi and Chainguard with PHP 5 (this system doesn't provide enchant 1)
- Wolfi and Chainguard with PHP 7 (this system doesn't provide enchant 1)
gd
Command line options:
| Option | Description | Default |
|---|---|---|
--gd:without-avif |
Skip the AVIF support if it would require compiling libaom, libyuv and libavif |
geoip
Not available on macOS (Homebrew doesn't provide the GeoIP library)
geos
Not available on:
- Alpine 3.0 to 3.8 (this system doesn't provide the GEOS library)
- Alpine 3.9 to 3.10 (the extension can't be compiled with the compiler or the libraries of this system)
imap
Not available on:
- Amazon Linux (this system doesn't provide the c-client library)
- Enterprise Linux 9 to 10 (this system doesn't provide the c-client library)
- Fedora (this system doesn't provide the c-client library)
- Wolfi and Chainguard (this system doesn't provide the c-client library)
inotify
Not available on macOS (inotify is an API of the Linux kernel)
interbase
Not available on Amazon Linux 2023 (this system doesn't provide the Firebird client library)
judy
Not available on:
- Alpine 3.13 to 3.15 (the extension can't be compiled with the compiler or the libraries of this system)
- Enterprise Linux 8 (this system doesn't provide the Judy library)
luasandbox
Not available on:
- Amazon Linux 2023 (this system doesn't provide Lua 5.1)
- macOS (Homebrew doesn't provide Lua 5.1)
- Wolfi and Chainguard (this system doesn't provide Lua 5.1)
lz4
Not available on:
- Alpine 3.0 to 3.8 (the version of the LZ4 library of this system is too old)
- Debian 8 (the version of the LZ4 library of this system is too old)
- Ubuntu 14.04 (the version of the LZ4 library of this system is too old)
mcrypt
Not available on:
- Enterprise Linux 10 (this system doesn't provide the mcrypt library)
- Amazon Linux 2023 (this system doesn't provide the mcrypt library)
- macOS (Homebrew doesn't provide the mcrypt library)
memprof
Not available on:
- thread-safe (ZTS) builds of PHP
- Alpine 3.0 to 3.8 (this system doesn't provide the Judy library)
- Alpine 3.9 to 3.15 (the extension can't be compiled with the compiler or the libraries of this system)
- Enterprise Linux 8 (this system doesn't provide the Judy library)
mosquitto
Not available on Amazon Linux 2023 (this system doesn't provide the Mosquitto library)
newrelic
Not available on:
- thread-safe (ZTS) builds of PHP
- macOS (New Relic doesn't provide the agent for this system)
Command line options:
| Option | Description | Default |
|---|---|---|
--newrelic:install-daemon |
Also install the New Relic daemon | |
--newrelic:keep-log |
Keep the log file of the New Relic installer |
oci8
Command line options:
| Option | Description | Default |
|---|---|---|
--oci8:with-oci8[=]value |
The kind and the path of the Oracle client |
operator
Not available on thread-safe (ZTS) builds of PHP
parallel
Not available on non-thread-safe (NTS) builds of PHP
parle
Not available on Debian 8 (the extension can't be compiled with the compiler or the libraries of this system)
pdo_firebird
Not available on Amazon Linux 2023 (this system doesn't provide the Firebird client library)
pdo_oci
Command line options:
| Option | Description | Default |
|---|---|---|
--pdo_oci:with-pdo-oci[=]value |
The kind and the path of the Oracle client |
pdo_snowflake
Not available on:
- Alpine (the vendor only supports glibc)
- Debian 8 (the extension requires OpenSSL 1.1)
- Ubuntu 14.04 to 16.04 (the extension requires OpenSSL 1.1)
- Enterprise Linux 8 with PHP 8.5 (the extension includes OpenSSL 3, which is not compatible with the OpenSSL 1.1 of this system)
- Enterprise Linux 8 with PHP 8.6 (the extension includes OpenSSL 3, which is not compatible with the OpenSSL 1.1 of this system)
- Fedora 45 with PHP 8.5 (the extension includes OpenSSL 3, which is not compatible with the OpenSSL 4 of this system)
- Fedora 45 with PHP 8.6 (the extension includes OpenSSL 3, which is not compatible with the OpenSSL 4 of this system)
- Wolfi and Chainguard with PHP 8.5 (the extension includes OpenSSL 3, which is not compatible with the OpenSSL 4 of this system)
- Wolfi and Chainguard with PHP 8.6 (the extension includes OpenSSL 3, which is not compatible with the OpenSSL 4 of this system)
pdo_sqlsrv
Not available on:
- Alpine 3.7 to 3.8 (the Microsoft ODBC Driver requires unixODBC 2.3.6 or later)
- Amazon Linux (Microsoft doesn't publish the ODBC Driver for this system)
- Fedora (Microsoft doesn't publish the ODBC Driver for this system)
- Wolfi and Chainguard (Microsoft doesn't publish the ODBC Driver for this system)
php_trie
Not available on macOS (the extension can't be compiled with the compiler or the libraries of this system)
phpy
Not available on:
- Debian 10 (the version of Python of this system is too old)
- Ubuntu 14.04 to 18.04 (the version of Python of this system is too old)
pspell
Not available on Wolfi and Chainguard (this system doesn't provide the Aspell library)
pthreads
Not available on non-thread-safe (NTS) builds of PHP
rdkafka
Not available on Amazon Linux 2023 (this system does not provide the librdkafka library)
recode
Not available on:
- Alpine 3.11 to 3.15 (the recode 3.7 library provided by this system does not work)
- Wolfi and Chainguard (this system doesn't provide the recode library)
relay
Not available on:
- Alpine 3.10 to 3.16 with PHP ZTS (the vendor doesn't publish ZTS builds for this system)
- Alpine 3.17 with PHP ZTS (the ZTS build requires the ck library, which is not available)
- Alpine 3.22 to 3.24 with PHP ZTS (the ZTS build requires libhiredis 1.1.0, which is not available)
- Debian 10 to 11 with PHP ZTS (the vendor doesn't publish ZTS builds for this system)
- Debian 12 with PHP ZTS (the ZTS build requires libhiredis 1.1.0, which is not available)
- Amazon Linux 2023 with PHP ZTS (the ZTS build requires the ck library, which is not available)
- Enterprise Linux 8 with PHP ZTS (the vendor doesn't publish ZTS builds for this system)
- Enterprise Linux 9 with PHP ZTS (the ZTS build requires libhiredis 1.1.0, which is not available)
- Fedora 45 to 46 (the vendor builds require OpenSSL 3, but this system uses OpenSSL 4)
- macOS with PHP ZTS (the vendor doesn't publish ZTS builds for this system)
- Wolfi and Chainguard (the vendor doesn't publish builds for this system)
saxon
Not available on:
- Alpine with PHP 7 (the source code of SaxonC does not compile (int64_t is not defined))
- macOS with PHP 7 (the versions of SaxonC that support PHP 7 are not compatible with this system)
Command line options:
| Option | Description | Default |
|---|---|---|
--saxon:edition[=]value |
The edition to be installed: EE (Enterprise), PE (Professional) or HE (Home) | EE |
simdjson
Not available on Debian 8 to 9 (the extension can't be compiled with the compiler or the libraries of this system)
snmp
Not available on:
- Enterprise Linux 9 to 10 with PHP 5 (the extension requires DES before PHP 8.0, but the SNMP library of this system doesn't support it)
- Enterprise Linux 9 to 10 with PHP 7 (the extension requires DES before PHP 8.0, but the SNMP library of this system doesn't support it)
- Fedora with PHP 5 (the extension requires DES before PHP 8.0, but the SNMP library of this system doesn't support it)
- Fedora with PHP 7 (the extension requires DES before PHP 8.0, but the SNMP library of this system doesn't support it)
snuffleupagus
IPE installs snuffleupagus with its default rules, which also block IPE itself. To run IPE again after snuffleupagus has been installed, you have two options:
- run it with the rules disabled:
php -d sp.configuration_file= /usr/local/bin/install-php-extensions ... - install snuffleupagus with the
--snuffleupagus:allow-ipeoption.
The --snuffleupagus:allow-ipe option adds to the rules some exceptions for the files of IPE, using the path where IPE is when it installs snuffleupagus (if you later run IPE from another path, it will be blocked).
Since snuffleupagus ignores the function_r() rules for the functions that have function() rules, IPE adds an exception for every function mentioned in the default rules.
Please remark that, with this option, any PHP code can bypass the rules of snuffleupagus by including the files of IPE and using its classes: delete IPE when you no longer need it (or remove the exceptions between # BEGIN install-php-extensions rules and # END install-php-extensions rules at the beginning of the snuffleupagus.rules file).
The option is available only when running IPE as a program (bin/install-php-extensions or the phar): when using IPE as a library, it's up to you to handle the rules of snuffleupagus (see LIBRARY.md).
Not available on thread-safe (ZTS) builds of PHP
Command line options:
| Option | Description | Default |
|---|---|---|
--snuffleupagus:allow-ipe |
Let install-php-extensions bypass the default rules (any PHP code could do the same by using its files: delete install-php-extensions when you no longer need it) |
sodium
Not available on:
- Debian 8 (libsodium 1.0.0 is too old - at least 1.0.9 is required)
- Ubuntu 14.04 to 16.04 (libsodium 1.0.8 is too old - at least 1.0.9 is required)
sqlsrv
Not available on:
- Alpine 3.7 to 3.8 (the Microsoft ODBC Driver requires unixODBC 2.3.6 or later)
- Amazon Linux (Microsoft doesn't publish the ODBC Driver for this system)
- Fedora (Microsoft doesn't publish the ODBC Driver for this system)
- Wolfi and Chainguard (Microsoft doesn't publish the ODBC Driver for this system)
statgrab
Not available on:
- Alpine 3.12 to 3.16 (the extension can't be compiled with the compiler or the libraries of this system)
- Wolfi and Chainguard (this system doesn't provide the statgrab library)
swoole
Not available on:
- POSIX systems with 32-bit PHP 8.3 (swoole 5.1+ does not support 32-bit systems, and older versions do not support PHP 8.3+)
- POSIX systems with 32-bit PHP 8.4 (swoole 5.1+ does not support 32-bit systems, and older versions do not support PHP 8.3+)
- POSIX systems with 32-bit PHP 8.5 (swoole 5.1+ does not support 32-bit systems, and older versions do not support PHP 8.3+)
tideways
Not available on:
- Debian 13 to 15 with PHP 5 (the module for PHP 7.1 and older requires glibc 2.37 or older)
- Debian 13 to 15 with PHP 7.0 (the module for PHP 7.1 and older requires glibc 2.37 or older)
- Debian 13 to 15 with PHP 7.1 (the module for PHP 7.1 and older requires glibc 2.37 or older)
- Enterprise Linux 10 with PHP 5 (the module for PHP 7.1 and older requires glibc 2.37 or older)
- Enterprise Linux 10 with PHP 7.0 (the module for PHP 7.1 and older requires glibc 2.37 or older)
- Enterprise Linux 10 with PHP 7.1 (the module for PHP 7.1 and older requires glibc 2.37 or older)
- Fedora with PHP 5 (the module for PHP 7.1 and older requires glibc 2.37 or older)
- Fedora with PHP 7.0 (the module for PHP 7.1 and older requires glibc 2.37 or older)
- Fedora with PHP 7.1 (the module for PHP 7.1 and older requires glibc 2.37 or older)
- Ubuntu 23.10 to 26.10 with PHP 5 (the module for PHP 7.1 and older requires glibc 2.37 or older)
- Ubuntu 23.10 to 26.10 with PHP 7.0 (the module for PHP 7.1 and older requires glibc 2.37 or older)
- Ubuntu 23.10 to 26.10 with PHP 7.1 (the module for PHP 7.1 and older requires glibc 2.37 or older)
v8js
Not available on:
- Debian 10 to 11 (the version of the V8 library of this system is too old)
- Ubuntu 20.04 to 22.04 (the version of the V8 library of this system is too old)
- Alpine 3.12 to 3.18 (the version of the V8 library of this system is too old)
- macOS (the version of the V8 library of this system is too recent)
- Wolfi and Chainguard (this system doesn't provide the V8 library)
vips
Not available on:
- Alpine 3.9 (the extension can't be compiled with the compiler or the libraries of this system)
- Amazon Linux (this system doesn't provide the vips library)
- Debian 8 (the extension can't be compiled with the compiler or the libraries of this system)
- Enterprise Linux (this system doesn't provide the vips library)
wikidiff2
Not available on Debian 8 to 9 (the extension can't be compiled with the compiler or the libraries of this system)
xattr
Not available on macOS (the extension uses functions available only on Linux)
xpass
Not available on:
- Debian 10 (the extension can't be compiled with the compiler or the libraries of this system)
- Enterprise Linux 8 (the extension requires libxcrypt 4.4 or later)
yajl_stream
Not available on Enterprise Linux 10 (this system doesn't provide the YAJL library)
zookeeper
Not available on thread-safe (ZTS) builds of PHP 8.2, 8.3, 8.4, 8.5
Optional repositories on Enterprise Linux
On Enterprise Linux (AlmaLinux, CentOS Stream, Oracle Linux, Red Hat Enterprise Linux, Rocky Linux), many system packages needed by the PHP extensions are only available in the CodeReady Builder repository (CRB, called PowerTools on version 8) or in EPEL. IPE doesn't enable them: if it fails because some packages are missing, enable them before running IPE.
| System | Commands |
|---|---|
| AlmaLinux, CentOS Stream, Rocky Linux | dnf install -y epel-release dnf-plugins-core && crb enable |
| Oracle Linux | dnf install -y oracle-epel-release-el$(rpm -E %rhel) dnf-plugins-core && dnf config-manager --set-enabled ol$(rpm -E %rhel)_codeready_builder |
| Red Hat Universal Base Image (CRB is already enabled) | dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %rhel).noarch.rpm |
| Red Hat Enterprise Linux | dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %rhel).noarch.rpm && subscription-manager repos --enable codeready-builder-for-rhel-$(rpm -E %rhel)-$(arch)-rpms |
With the PHP packages of Remi, some extensions (like dba) also need libraries that are only available in the remi repository, which is disabled by default: enable it with dnf config-manager --set-enabled remi.
macOS
IPE works with the PHP formulae of Homebrew, like php and php@8.4.
It needs the Xcode Command Line Tools, which provide the compiler and make: you can install them with xcode-select --install.
Run IPE as your user, not with sudo: Homebrew refuses to run as root.
IPE installs the extensions for the PHP that runs it, or for the one specified with the --php option.
The formulae of the older PHP versions (like php@8.4) are keg-only, so their php command is not in the PATH: use for example install-php-extensions --php=/opt/homebrew/opt/php@8.4/bin/php redis, or run IPE with the PHP command of the formula (/opt/homebrew/opt/php@8.4/bin/php install-php-extensions redis).
IPE installs with Homebrew the formulae needed by the extensions, without running brew update and without upgrading the formulae that are already installed (PHP included).
The formulae needed only to compile the extensions are uninstalled at the end, unless they were already installed.
homebrew-core doesn't have formulae for single PHP extensions, but IPE can use the ones of the shivammathur/extensions tap if you added and trusted it together with the shivammathur/php tap, which its formulae depend on (brew tap shivammathur/extensions && brew tap shivammathur/php && brew trust shivammathur/extensions && brew trust shivammathur/php).
Otherwise, or with --system-packages=never, IPE compiles the extensions.
Wolfi
IPE works with the PHP packages of Wolfi, like php-8.4.
They provide the phar extension separately (php-8.4-phar), and IPE needs curl, wget or the openssl extension (php-8.4-openssl) to download the files, but the cgr.dev/chainguard/wolfi-base image doesn't include them:
FROM cgr.dev/chainguard/wolfi-base ADD --chmod=0755 https://github.com/mlocati/install-php-extensions/releases/latest/download/install-php-extensions /usr/local/bin/ RUN apk add --no-cache php-8.4 php-8.4-phar php-8.4-openssl \ && install-php-extensions gd xdebug
System dependencies
Some system dependencies can be customized with these command line options:
| Dependency | Option | Description | Default |
|---|---|---|---|
| lib-aspell | --lib-aspell:languages[=]value |
The comma-separated list of the languages of the dictionaries to be installed | en |
| lib-icu | --lib-icu:en-only |
Install a smaller, English-only, ICU library on Alpine 3.16 and later | |
| oracle-instantclient | --oracle-instantclient:basic |
Install the Basic package instead of the much smaller Basic Light one |
Transition from docker-php-extension-installer
To make it easier to switch from docker-php-extension-installer, IPE temporarily understands its syntax: its IPE_... environment variables, @composer, @fix_letsencrypt, the old names of the extensions (like pecl_http), and versions like xdebug-^3.2 and org/repo@ref.
IPE prints a warning that shows the new syntax to be used: this compatibility layer will be removed in a future version.
By default, the old syntax is understood only in the official Docker PHP images.
You can change this with the IPE_LEGACY_SYNTAX environment variable: set it to 1 to always enable the old syntax, or to 0 to always disable it.
Contributing
See CONTRIBUTING.md.
Usage as a PHP library
See LIBRARY.md.
Do you want to really say thank you?
You can offer me a monthly coffee or a one-time coffee 😉