PHP 8.1.9: Downloads, Changelog, News

Release Information

Release
8.1.9
PHP Version
PHP 8.1
Release Date
Release Type
Bug Fix Release
Release Status
Use PHP 8.1.28 instead
Branch Status
Security-Fixes Only

PHP 8.1 is currently only receiving security fixes. PHP 8.1.9 is not the latest version in the series, and using this release is not recommended. PHP 8.1.28 is the latest in the series.

Downloads

Source Code

Git Clone
Use Git to clone the 8.1.9 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.1.9
How to compile PHP
PHP can be compiled by setting up the dependencies, building the configure script (./buildconf), configuring the build ./configure, and running make.
Detailed articles on how to compile PHP are available for Ubuntu/Debian based systems and Fedora/RHEL based systems.

Windows binaries

Non-Thread Safe Builds
Non-Thread Safe (NTS) builds are single-threaded PHP builds. They can be used on web servers that integrate PHP over FastCGI protocol, such as Nginx, Caddy, and IIS.
Thread-Safe Builds
Thread-Safe (TS) builds are multi-thread PHP builds, often used to integrate PHP as a Server API for multithreaded servers. The most common use case is using PHP as an Apache module.

Docker/Podman Containers

PHP CLI
PHP CLI Containers images only include the PHP CLI, and no FPM or Apache modules. The Alpine builds are lightweight, but may introduce incompatibilities due to their musl builds. Albeit their larger size, the Debian-based (without the "-alpine" suffix) images are more complete, and widely used.

Alpine-based: Lightweight, but may introduce incompatibilities due to their musl builds.
docker pull php:8.1.9-cli-alpine

Debian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.1.9-cli
PHP CLI + Web Server Integration
These container images include PHP CLI, and a web server integration. FPM container images can be integrated with web servers such as Nginx, Caddy, and Apache with Event MPM. The Apache container images include Apache web server, integrating PHP as an Apache module.

Alpine-based: Lightweight, but may introduce incompatibilities due to their musl builds.
docker pull php:8.1.9-fpm-alpine

Debian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.1.9-apache

Debian-based NTS FPM: PHP-FPM, can be integrated with Nginx, Caddy, and other web servers over Fast CGI.
docker pull php:8.1.9-fpm

ChangeLog

CLI

  • Fixed potential overflow for the builtin server via the PHP_CLI_SERVER_WORKERS environment variable.
  • Fixed GH-8952 (Intentionally closing std handles no longer possible).

Core

  • Fixed bug GH-8923 (error_log on Windows can hold the file write lock).
  • Fixed bug GH-8995 (WeakMap object reference offset causing TypeError).

Date

  • Fixed bug #80047 (DatePeriod doesn't warn with custom DateTimeImmutable).

FPM

  • Fixed zlog message prepend, free on incorrect address.
  • Fixed possible double free on configuration loading failure.

GD

  • Fixed bug GH-8848 (imagecopyresized() error refers to the wrong argument).

Intl

  • Fixed build for ICU 69.x and onwards.

OPcache

  • Fixed bug GH-8847 (PHP hanging infinitly at 100% cpu when check php syntaxe of a valid file).
  • Fixed bug GH-8030 (Segfault with JIT and large match/switch statements).

Reflection

  • Fixed bug GH-8943 (Fixed Reflection::getModifiersNames() with readonly modifier).
  • Fixed bug GH-8982 (Attribute with TARGET_METHOD is rejected on fake closure of method).

Standard

  • Fixed the crypt_sha256/512 api build with clang > 12.
  • Uses CCRandomGenerateBytes instead of arc4random_buf on macOs.
  • Fixed bug GH-9017 (php_stream_sock_open_from_socket could return NULL).

Commit List

Arnaud Le Blanc

  • Fix GH-8952: std streams can not be deliberately closed in GH-8953
  • Fix JIT crash with large number of match/switch arms in GH-8961

Ben Ramsey

Christoph M. Becker

David Carlier

  • Fix the crypt sha apis build (with recent clang versions) in b3569865b3
  • Update FreeBSD CI image in 4f4457a6e9
  • intl extension, build fix for icu >= 69.x release. ubrk/ucnv_safeClone had been deprecated in favor of ubrk/ucnv_clone which does not use user provided stacks but remain thread safe in 7c3dfbb845

David CARLIER

  • Revert "Update FreeBSD CI image." in 35ca407fcb
  • random extension macOs handling update in d830a1f6f0
  • Revert "FPM: Downgrade occasional "failed to acquire scoreboard" warning" in 2a5b2cca85
  • Revert "FPM: Downgrade occasional "failed to acquire scoreboard" warning" in 9a8ae45c4b

Derick Rethans

  • Fixed #80047: DatePeriod doesn't warn with custom DateTimeImmutable in 973c3f6e24
  • Revert "Fixed #80047: DatePeriod doesn't warn with custom DateTimeImmutable" in 2f3d0a481a
  • Fixed bug #80047 (DatePeriod doesn't warn with custom DateTimeImmutable) in 4b0bb315da

Dmitry Stogov

Felix Wiedemann

  • FPM: Downgrade occasional "failed to acquire scoreboard" warning in 3040f75f43

Gabriel Caruso

George Peter Banyard

  • Abort LMDB transaction whe trying to delete non-existing key in 8fce70ae7b
  • Revert "Fix GH-8563 Different results for seek() on SplFileObject and SplTempFileObject" in 79a283240e

Grégoire Paris

  • Use proper grammar in error message in 13f55d5c1b

guoyiyuan

  • Prevent potential buffer overflow for large value of php_cli_server_workers_max in 789a37f144

Heiko Weber

  • FPM: zlog, fix free on wrong address for message prepend in 325ca31dcf
  • FPM: Fix possible double free on configuration load failure in bd6793372b
  • Fix GH-9017: php_stream_sock_open_from_socket could return NULL in 3b7babf9b3

Ilija Tovilo

  • Add test coverage job in b7f0950ffe
  • Disallow assigning reference to unset readonly property in 110573726b

Patrick Allaert

Pierrick Charron

  • Fixed bug GH-8943 Reflection::getModifiersNames() with readonly modifier in c650e67c90

Tobias Bachert

  • Fix WeakMap object reference offset causing TypeError in GH-8995
Subscribe to PHP.Watch newsletter for monthly updates

You will receive an email on last Wednesday of every month and on major PHP releases with new articles related to PHP, upcoming changes, new features and what's changing in the language. No marketing emails, no selling of your contacts, no click-tracking, and one-click instant unsubscribe from any email you receive.