Tested on 8.6.0RC4 · Updated

pecl: not found on php:8.6

The official php:8.6 Docker images have no pecl and no pear. This is deliberate, and it will not come back. The same images also leave out the built-in mbstring extension, and every variant is now built thread-safe (ZTS). PHP 8.6.0 is due on 19 November 2026; the release candidates are on Docker Hub today as php:8.6-rc-cli, php:8.6-rc-fpm-alpine and so on.

We ran 8.6.0RC4 next to 8.5.12 on three official images (cli-trixie, apache-trixie, fpm-alpine3.24) on 22 October 2026. Three things break when you move a Dockerfile from 8.5 to 8.6:

php:8.5.12php:8.6.0RC4
pecl install apcuinstallssh: 1: pecl: not found, exit code 127
mbstringbuilt inmissing: mb_strlen() is Call to undefined function
Thread safetynon-thread-safe (NTS)thread-safe (ZTS), on all three images

mbstring has a tested one-line fix. PECL extensions do not have a general one yet: on RC4, neither install-php-extensions nor PIE installed apcu, the extension we tried. Commands and outputs are in the receipts.

Put mbstring back

Install the Oniguruma headers, then build mbstring from the PHP source that ships in the image. This worked on all three 8.6.0RC4 images.

Debian (cli, apache, fpm):

RUN apt-get update && apt-get install -y libonig-dev \
	&& docker-php-ext-install mbstring

Alpine:

RUN apk add --no-cache oniguruma-dev \
	&& docker-php-ext-install mbstring

Check it:

php -r 'echo mb_strlen("é"), PHP_EOL;'

That prints 1. Without the headers, docker-php-ext-install mbstring stops with configure: error: Package requirements (oniguruma) were not met. That part is not new: it fails the same way on 8.5.12, where nobody needed it because mbstring was already built in.

Laravel still resolves without it. composer update --dry-run for laravel/framework ^12.0 succeeded on 8.6.0RC4 without ext-mbstring, because symfony/polyfill-mbstring (v1.43.0) provides it. We did not run an application on the polyfill, so we did not measure its speed or edge cases. Code that calls mb_* functions with no polyfill installed fails with the fatal error above.

PECL extensions on 8.6

The official image documentation on Docker Hub still shows pecl install redis-5.3.7 under "PECL extensions", with no note about 8.6 (read 22 October 2026). On 8.6 that line exits 127.

The two replacements people reach for did not install apcu on 8.6.0RC4. Both installed it on 8.5.12.

install-php-extensions (mlocati/docker-php-extension-installer, script at commit 611df5a7, 20 October 2026) refuses 8.6 and then fails in its fallback:

### ERROR: Unsupported PHP version: 8.6 ###
### INSTALLING REMOTE MODULE apcu ###
Fatal error: Uncaught Exception: Extension 'mbstring' required but not loaded, full required list: zlib, mbstring, simplexml, json, dom, openssl, phar in phar:///tmp/pickle/src/Console/Application.php:96

The fallback downloads pickle, and pickle needs the mbstring that the 8.6 image no longer has. The project's maintainer said on 30 September that the script does not support PHP 8.6 because pecl was removed from the images; support depends on the project's move to PIE.

PIE 1.5.3 (pie install apcu/apcu) picked apcu 5.1.28, the latest release (December 2025). Its make step failed on 8.6.0RC4. The same command built and loaded apcu on 8.5.12. We did not keep the compiler error. apcu's 8.6 fixes are merged but not released: krakjoe/apcu#634 asks for a 5.1.29 release before PHP 8.6.

PIE installs whatever release an extension has published. So before you change FROM php:8.5-… to 8.6, check that each extension you install has a release that supports PHP 8.6. If one does not, stay on 8.5 for now. We tried only apcu through PIE and install-php-extensions; we have not yet tested an extension whose current release builds on 8.6.

Every 8.6 image is thread-safe

On 8.5 the default images are non-thread-safe (NTS), and ZTS has its own zts tags. On 8.6 every variant is ZTS and no separate zts variant is built (docker-library/php#1686). The 8.6-rc-zts tags still on Docker Hub stopped updating at RC2 on 27 September. Extensions you compile in the image with docker-php-ext-install or PIE are built to match. A prebuilt binary extension made for NTS PHP will not load into ZTS PHP, so if you copy a vendor's .so into your image, get its ZTS build. We did not test any binary extensions. To check your PHP:

php -r 'echo PHP_ZTS, PHP_EOL;'

That prints 1 on a ZTS build and an empty line on NTS.

When it reaches your Dockerfile

  • FROM php:8.5-fpm and other tags with a minor version: nothing changes on 19 November. You meet the three changes when you edit the tag to 8.6. In a GitHub code-search sample of public Dockerfiles that run pecl install on the official image, 93% of those build stages (2,275 of 2,438) pin a minor version.
  • php:8-…, php:latest, php:fpm, php:alpine and other tags without a minor version: these will move to 8.6. Last year the 8 and latest tags moved to 8.5 on its release day. Your next rebuild after the move gets an image without pecl and mbstring.
  • CI matrices that already test 8.6-rc: you can hit all three now.

The 8.6 images are release candidates until 19 November. On that day we will check the final images and the moved tags again and update this page if anything differs.

Receipts

All runs were on our own host on 22 October 2026: one container per test, on these image digests. This was not independently reproduced.

ImageDigest
php:8.6.0RC4-cli-trixiesha256:b0d0fead5c9acb61369f57eac767bb4912042e023a1bf5c1c05d9ad0aea43e3e
php:8.6.0RC4-apache-trixiesha256:4756f73d6161a33af0cd1e13e66b229a111555f711fef6fd8f1d8407c57d27cb
php:8.6.0RC4-fpm-alpine3.24sha256:ce83570220c1af386187300ee5b05331747103fef53a242acc5c3ab05b25329c
php:8.5.12-cli-trixiesha256:595a7cbb1e0547336319f228c4dc991c2a199350ab12b1c8fda05f73abd06e6b
php:8.5.12-apache-trixiesha256:e25ab14ef2cfec3bab9dd66c6cf871691146f428fbd72241b1a2c38fcacf92f5
php:8.5.12-fpm-alpine3.24sha256:4943e6c8a08008605b470f6171d611a89384bac97188e4b0a7aefd3f793cd040

Tools: PIE 1.5.3, Composer 2.10.3, install-php-extensions at commit 611df5a7.

Test8.5.12 (3 images)8.6.0RC4 (3 images)
command -v pecl, command -v pearfoundnot found, exit 127
pecl install apcuexit 0pecl: not found, exit 127
php -r 'echo mb_strlen("é"), PHP_EOL;'1Call to undefined function mb_strlen(), exit 255
php -r 'echo PHP_ZTS;'prints nothing (NTS)1 (ZTS)
docker-php-ext-install mbstring, no extra packagesfails: oniguruma not foundfails: oniguruma not found
libonig-dev (Alpine: oniguruma-dev), then docker-php-ext-install mbstringbuildsbuilds, mb_strlen prints 1
install-php-extensions apcuinstallsUnsupported PHP version: 8.6, then pickle: Extension 'mbstring' required but not loaded
git and unzip installed, then pie install --no-interaction apcu/apcuapcu 5.1.28 loadedapcu 5.1.28 make fails
composer update --dry-run, laravel/framework ^12.0resolvesresolves through symfony/polyfill-mbstring
composer update --dry-run, symfony/console ^7.0resolvesresolves

The first test ran twice on each image with the same results. On Alpine, the pecl and PIE tests installed $PHPIZE_DEPS first. PIE warned on every image, 8.5.12 included, that libtoolize was missing.

Sources: the removal of pecl and pear and the mbstring change, docker-library/php#1654; the maintainer's "this is intentional and this time it's for keeps", docker-library/php#1682; the release date, the PHP 8.6 release schedule (RC5 on 5 November, GA on 19 November).