Available Extensions
Available Extensions
Complete reference of all PHP extensions included in Cbox PHP Base Images by tier.
Extension Overview by Tier
Cbox images come in four tiers with different extension sets:
| Tier | Extensions | Best For |
|---|---|---|
| Slim | 25+ core | APIs, microservices |
| Standard | Slim + ImageMagick, vips, Node.js, Bun | Most apps (DEFAULT) |
| Chromium | Standard + Chromium | Browsershot, Dusk, PDF |
| Dev | Chromium + Xdebug, PCOV, SPX | Development, testing, CI/CD |
Slim Tier Extensions
The Slim tier includes all core extensions needed for most PHP applications.
PHP Extensions
| Extension | Type | Purpose |
|---|---|---|
opcache |
Built-in | Bytecode caching for performance |
pdo_mysql |
Built-in | MySQL PDO driver |
pdo_pgsql |
Built-in | PostgreSQL PDO driver |
mysqli |
Built-in | MySQL improved extension |
pgsql |
Built-in | PostgreSQL extension |
redis |
PECL | Redis client extension |
apcu |
PECL | User-land data caching |
msgpack |
PECL | MessagePack serialization |
cbox_telemetry |
Source | Runtime telemetry - CPU profiler, connect/cURL timing, crash records. Opt-in via PHP_TELEMETRY_NATIVE=true, pre-1.0, PHP 8.3+ only |
zip |
Built-in | ZIP archive support |
intl |
Built-in | Internationalization functions |
bcmath |
Built-in | Arbitrary precision mathematics |
gd |
Built-in | Image processing (WebP, JPEG, PNG) |
exif |
Built-in | EXIF metadata reading |
pcntl |
Built-in | Process control (signals, forking) |
sockets |
Built-in | Low-level socket interface |
bz2 |
Built-in | Bzip2 compression |
gmp |
Built-in | Arbitrary precision math |
Standard Tier Additions
These extensions are added in the standard tier (and inherited by chromium/dev):
| Extension | Source | Description |
|---|---|---|
mongodb |
PECL | MongoDB driver |
opentelemetry |
PECL | OpenTelemetry auto-instrumentation - opt-in via PHP_OPENTELEMETRY=true: loading it enables the Zend observer API, measured at -18.5% throughput on a Laravel app even with no OTel SDK installed |
imagick |
PECL | ImageMagick bindings |
vips |
PECL | libvips image processing |
soap |
Built-in | SOAP protocol |
xsl |
Built-in | XSL transformations |
ldap |
Built-in | LDAP directory services |
calendar |
Built-in | Calendar conversion |
gettext |
Built-in | GNU translations |
shmop |
Built-in | Shared memory operations |
sysvmsg |
Built-in | System V message queue |
sysvsem |
Built-in | System V semaphore |
sysvshm |
Built-in | System V shared memory |
Tools Included
| Tool | Purpose |
|---|---|
| Composer 2 | PHP package manager |
| Cbox Init | Process manager |
| curl, wget | HTTP clients |
| git | Version control |
| unzip | Archive extraction |
Standard Tier Extensions
The Standard tier includes everything in Slim, plus image processing, Node.js, and Bun.
Additional Extensions (on top of Slim)
| Extension | Type | Purpose |
|---|---|---|
imagick |
PECL | ImageMagick for complex image operations |
vips |
PECL | High-performance libvips (4-10x faster) |
gd (AVIF) |
Built-in | GD rebuilt with AVIF support |
Additional Tools
| Tool | Purpose |
|---|---|
| Node.js 22 | JavaScript runtime |
| npm / npx | Node package manager |
| Bun | Fast JavaScript runtime & package manager |
| exiftool | Advanced image metadata |
| ghostscript | PDF/PostScript support |
| librsvg | SVG rendering |
| icu-data-full | Complete ICU locale data |
Image Format Support (Standard Tier)
| Format | GD | ImageMagick | libvips |
|---|---|---|---|
| JPEG | ✅ | ✅ | ✅ |
| PNG | ✅ | ✅ | ✅ |
| GIF | ✅ | ✅ | ✅ |
| WebP | ✅ | ✅ | ✅ |
| AVIF | ✅ | ✅ | ✅ |
| HEIC/HEIF | ❌ | ✅ | ✅ |
| ❌ | ✅ | ❌ | |
| SVG | ❌ | ✅ | ✅ |
| TIFF | ❌ | ✅ | ✅ |
Chromium Tier Extensions
The Chromium tier includes everything in Standard, plus Chromium for browser automation.
Additional Components (on top of Standard)
| Component | Purpose |
|---|---|
| Chromium | Headless browser (Browsershot/Puppeteer, Dusk) |
| chromium-driver | chromedriver, apt-version-matched with Chromium - zero-download Dusk |
Playwright Chromium (/ms-playwright) |
Pest v4 browser testing - refreshed to playwright@latest weekly |
| nss | Network Security Services |
| harfbuzz | Text shaping |
| Emoji/unicode fonts | fonts-noto-color-emoji, fonts-unifont, fonts-freefont-ttf - screenshot fidelity |
Environment Variables (auto-set)
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
Dev Tier Extensions
The Dev tier includes everything in Chromium, plus development and profiling tools.
Additional Extensions (on top of Chromium)
| Extension | Type | Version | Purpose |
|---|---|---|---|
xdebug |
PECL | 3.5.0 | Step debugging, code coverage, profiling |
pcov |
PECL | 1.0.12 | Fast code coverage (10x faster than Xdebug) |
spx |
GitHub | 0.4.22 | Simple performance profiler with web UI |
Xdebug Configuration
The dev tier includes pre-configured Xdebug settings:
xdebug.mode=develop,debug,coverage
xdebug.client_host=host.docker.internal
xdebug.client_port=9003
xdebug.start_with_request=trigger
xdebug.discover_client_host=true
xdebug.log=/tmp/xdebug.log
xdebug.idekey=VSCODE
Xdebug Modes:
off- Disableddevelop- Development helpers (var_dump improvements)coverage- Code coverage collectiondebug- Step debugginggcstats- Garbage collection statisticsprofile- Profilingtrace- Function tracing
PCOV Configuration
PCOV is disabled by default (for faster execution). Enable it when running tests:
pcov.enabled=0
pcov.directory=/var/www/html
Usage:
# Enable PCOV for PHPUnit coverage
php -d pcov.enabled=1 vendor/bin/phpunit --coverage-text
SPX Profiler
SPX provides a web-based UI for profiling:
spx.http_enabled=1
spx.http_key=dev
spx.http_ip_whitelist=*
Access the SPX UI:
http://your-app/?SPX_KEY=dev&SPX_UI_URI=/
Dev Tier Best Practices
- Use PCOV for CI coverage - It's 10x faster than Xdebug coverage
- Disable Xdebug in production - Dev tier is NOT for production
- Use SPX for performance profiling - More visual than Xdebug profiler
- Switch modes as needed - Only enable what you need
# Fast coverage in CI
docker run --rm -e XDEBUG_MODE=off \
-v $(pwd):/var/www/html \
ghcr.io/cboxdk/php-baseimages/php-fpm:8.5-bookworm-dev-v1 \
php -d pcov.enabled=1 vendor/bin/phpunit --coverage-text
# Step debugging
docker run --rm -e XDEBUG_MODE=debug \
ghcr.io/cboxdk/php-baseimages/php-fpm:8.5-bookworm-dev-v1 \
php artisan test
Extension Comparison by Tier
| Extension | Slim | Standard | Chromium | Dev |
|---|---|---|---|---|
| opcache | ✅ | ✅ | ✅ | ✅ |
| pdo_mysql, pdo_pgsql | ✅ | ✅ | ✅ | ✅ |
| mysqli, pgsql | ✅ | ✅ | ✅ | ✅ |
| redis | ✅ | ✅ | ✅ | ✅ |
| apcu | ✅ | ✅ | ✅ | ✅ |
| msgpack | ✅ | ✅ | ✅ | ✅ |
| cbox_telemetry | ✅† | ✅† | ✅† | ✅† |
| intl | ✅ | ✅ | ✅ | ✅ |
| bcmath | ✅ | ✅ | ✅ | ✅ |
| gd (WebP) | ✅ | ✅ | ✅ | ✅ |
| exif | ✅ | ✅ | ✅ | ✅ |
| pcntl | ✅ | ✅ | ✅ | ✅ |
| sockets | ✅ | ✅ | ✅ | ✅ |
| bz2 | ✅ | ✅ | ✅ | ✅ |
| gmp | ✅ | ✅ | ✅ | ✅ |
| zip | ✅ | ✅ | ✅ | ✅ |
| gd (AVIF) | ❌ | ✅ | ✅ | ✅ |
| imagick | ❌ | ✅ | ✅ | ✅ |
| vips | ❌ | ✅ | ✅ | ✅ |
| mongodb | ❌ | ✅ | ✅ | ✅ |
| opentelemetry | ❌ | ✅* | ✅* | ✅* |
| soap | ❌ | ✅ | ✅ | ✅ |
| xsl | ❌ | ✅ | ✅ | ✅ |
| ldap | ❌ | ✅ | ✅ | ✅ |
| calendar | ❌ | ✅ | ✅ | ✅ |
| gettext | ❌ | ✅ | ✅ | ✅ |
| shmop | ❌ | ✅ | ✅ | ✅ |
| sysvmsg, sysvsem, sysvshm | ❌ | ✅ | ✅ | ✅ |
| Node.js 22 (+ npm/npx) | ❌ | ✅ | ✅ | ✅ |
| Bun | ❌ | ✅ | ✅ | ✅ |
| Chromium | ❌ | ❌ | ✅ | ✅ |
| Xdebug | ❌ | ❌ | ❌ | ✅ |
| PCOV | ❌ | ❌ | ❌ | ✅ |
| SPX | ❌ | ❌ | ❌ | ✅ |
* opentelemetry is installed but not loaded by default. Loading it enables
the Zend observer API, which taxes every PHP function call even with no OTel SDK
installed - measured at -18.5% throughput on a Laravel app (0% on tight-loop
code) on dedicated hardware. Set PHP_OPENTELEMETRY=true to load it; the
entrypoint appends the extension's scan dir to PHP_INI_SCAN_DIR, so it works
on read-only filesystems too.
If the goal is telemetry from a Laravel app rather than C-level auto-instrumentation, cboxdk/laravel-telemetry collects it in userland through the framework's own extension points - it does not enable the observer API, so it carries none of this tax.
† cbox_telemetry (cboxdk/telemetry-native)
is likewise installed but not loaded by default, for a different reason: it
is pre-1.0, and it installs fatal-signal handlers for its crash recorder. That
is not something an image should arm on every application that pulls the tag.
Its own measurements put loading it inside the noise floor of an FPM harness -
the gate here is about maturity, not about a measured tax. Set
PHP_TELEMETRY_NATIVE=true to load it. Absent from the PHP 8.2 images: the
extension supports 8.3+ only.
See Runtime telemetry below.
Runtime telemetry (cbox_telemetry)
cboxdk/telemetry-native is the native half of cboxdk/laravel-telemetry. The Laravel package keeps owning everything semantic - trace context, sampling policy, redaction, attribute naming, OTLP export. The extension only observes the PHP runtime, and answers the questions the userland package structurally cannot:
- Which call stacks burned the CPU - a statistical CPU profiler sampling on a per-thread CPU timer, not wall clock
- Why the connection took 180 ms - native timing around
PDO::__construct,PDO::connect,Redis::connect/pconnectandcurl_exec - What the process was doing when it died - a signal-safe crash recorder that writes one fixed-width record, then re-raises so the process dies exactly as it would have, core dump and all
It ships in every tier from slim up, on PHP 8.3 and newer, and it is off until you turn it on:
services:
app:
image: ghcr.io/cboxdk/php-baseimages/php-fpm-nginx:8.4-bookworm-v1
environment:
PHP_TELEMETRY_NATIVE: "true"
# FPM only - see the warning below
PHP_TELEMETRY_NATIVE_AUTO: "true"
Verify what you got:
docker compose exec app php -r 'print_r(cbox_telemetry_status());'
The two fields worth reading: timer_backend must say posix-thread-cputime
(anything else means samples measure wall time), and hook_detail reports
requested versus installed per hook group - which is how you find out that
redis.connect timings are missing because ext-redis is not in the image,
rather than because the hook is off.
PHP_TELEMETRY_NATIVE_AUTO is for FPM, not for workers
Automatic units open at RINIT, before any PHP runs, so a profile covers
framework boot instead of starting wherever your middleware does - on a cold
request that is often most of the time.
In a queue worker or an Octane server, RINIT fires once for the whole
process. An automatic unit there would span hours and mean nothing. Leave the
switch off in those containers and let the consumer call begin()/finish()
per job. That is why it is a separate variable rather than something
PHP_TELEMETRY_NATIVE=true implies.
Why it is opt-in
Unlike opentelemetry, this is not a performance gate. Upstream's FPM
measurements put loading the extension, installing the hooks and arming the
crash recorder inside the noise floor of the harness, and profiling every
request at 1 ms somewhere between nothing and about 5%.
It is off because it is pre-1.0 and because the crash recorder installs handlers for fatal signals. Arming those on every application that happens to pull a rolling tag is a decision for the application, not for the image. That calculus changes at 1.0; the variable will not.
Crash records and read-only filesystems
The recorder writes to cbox_telemetry.crash.dir (default /tmp/cbox-telemetry,
with a private 0700 subdirectory per uid). On a container with a read-only
root filesystem, mount a writable /tmp - otherwise cbox_telemetry_status()
reports crash_recorder => unavailable: directory and records nothing. It says
so truthfully; it does not fail the request.
Extension Versions
All PECL extensions use pinned versions for reproducibility:
| Extension | Version |
|---|---|
| redis | 6.3.0 |
| apcu | 5.1.28 |
| mongodb | 2.5.2 |
| opentelemetry | 1.2.1 |
| telemetry_native | 0.1.0 |
| msgpack | 3.0.1 |
| imagick | 3.8.1 |
| vips | 1.0.13 |
| xdebug | 3.5.3 |
| pcov | 1.0.12 |
| spx | 0.4.22 (from GitHub) |
Checking Installed Extensions
List All Extensions
# In running container
docker exec myapp php -m
# One-liner
docker run --rm ghcr.io/cboxdk/php-baseimages/php-fpm-nginx:8.5-bookworm-v1 php -m
Check Specific Extension
# Check if redis is loaded
docker exec myapp php -m | grep redis
# Get extension version
docker exec myapp php -r "echo phpversion('redis');"
Full Extension Info
# Detailed extension information
docker exec myapp php -i | grep -A 10 "redis"
Adding Extensions
PECL Extensions
FROM ghcr.io/cboxdk/php-baseimages/php-fpm-nginx:8.5-bookworm-v1
# Install PECL extension
RUN apt-get update && apt-get install -y $PHPIZE_DEPS && \
pecl install swoole && \
docker-php-ext-enable swoole && \
apt-get purge -y --auto-remove $PHPIZE_DEPS && rm -rf /var/lib/apt/lists/*
Core Extensions
FROM ghcr.io/cboxdk/php-baseimages/php-fpm-nginx:8.5-bookworm-v1
# Enable a disabled core extension
RUN docker-php-ext-install shmop
System Dependencies
Some extensions require system packages:
FROM ghcr.io/cboxdk/php-baseimages/php-fpm-nginx:8.5-bookworm-v1
# Example: Adding additional libraries
RUN apt-get update && apt-get install -y some-package-dev && \
docker-php-ext-install some-extension
Framework Requirements
Laravel
All Laravel requirements are satisfied by Slim tier:
| Requirement | Extension | Status |
|---|---|---|
| PHP >= 8.2 | - | ✅ PHP 8.2, 8.3, 8.4, 8.5 |
| Ctype | ctype | ✅ Built-in |
| cURL | curl | ✅ Built-in |
| DOM | dom | ✅ Built-in |
| Fileinfo | fileinfo | ✅ Built-in |
| Mbstring | mbstring | ✅ Built-in |
| OpenSSL | openssl | ✅ Built-in |
| PDO | pdo_mysql/pgsql | ✅ Included |
| Tokenizer | tokenizer | ✅ Built-in |
| XML | xml | ✅ Built-in |
Symfony
All Symfony requirements are satisfied by Slim tier:
| Requirement | Extension | Status |
|---|---|---|
| PHP >= 8.2 | - | ✅ PHP 8.2, 8.3, 8.4, 8.5 |
| Ctype | ctype | ✅ Built-in |
| iconv | iconv | ✅ Built-in |
| JSON | json | ✅ Built-in |
| SimpleXML | simplexml | ✅ Built-in |
WordPress
All WordPress requirements are satisfied by Standard tier (for ImageMagick):
| Requirement | Extension | Status |
|---|---|---|
| PHP >= 7.4 | - | ✅ PHP 8.2+ |
| MySQL | mysqli | ✅ Included |
| cURL | curl | ✅ Built-in |
| DOM | dom | ✅ Built-in |
| EXIF | exif | ✅ Included |
| Imagick/GD | gd, imagick | ✅ Standard tier |
| Mbstring | mbstring | ✅ Built-in |
| ZIP | zip | ✅ Included |
Browsershot / Laravel Dusk
Requires Chromium tier for Chromium:
| Requirement | Status |
|---|---|
| Chromium | ✅ Chromium tier |
| Puppeteer env vars | ✅ Auto-configured |
Troubleshooting
Extension Not Loading
# Check PHP error log
docker exec myapp cat /var/log/php/error.log
# Verify extension file exists
docker exec myapp ls /usr/local/lib/php/extensions/
Missing System Dependency
# Check for missing libraries
docker exec myapp ldd /usr/local/lib/php/extensions/*/redis.so
Version Conflicts
# Check loaded extension versions
docker exec myapp php -r "foreach(get_loaded_extensions() as \$ext) echo \$ext.': '.phpversion(\$ext).PHP_EOL;"
Need a specific extension? See Extending Images | Choosing Your Image