PHP 8.1.25: Downloads, Changelog, News

Release Information

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

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

Downloads

Source Code

Git Clone
Use Git to clone the 8.1.25 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.1.25
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.25-cli-alpine

Debian-based: More compatible with other components, complete, and are widely used.
docker pull php:8.1.25-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.25-fpm-alpine

Debian-based ZTS Apache: Includes Apache web server integrating PHP as an Apache module.
docker pull php:8.1.25-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.25-fpm

ChangeLog

Core

  • Fixed bug GH-12207 (memory leak when class using trait with doc block).
  • Fixed bug GH-12215 (Module entry being overwritten causes type errors in ext/dom).
  • Fixed bug GH-12273 (__builtin_cpu_init check).
  • Fixed bug #80092 (ZTS + preload = segfault on shutdown).

CLI

  • Ensure a single Date header is present.

CType

  • Fixed bug GH-11997 (ctype_alnum 5 times slower in PHP 8.1 or greater).

DOM

  • Restore old namespace reconciliation behaviour.
  • Fixed bug GH-8996 (DOMNode serialization on PHP ^8.1).

Fileinfo

  • Fixed bug GH-11891 (fileinfo returns text/xml for some svg files).

Filter

  • Fix explicit FILTER_REQUIRE_SCALAR with FILTER_CALLBACK

Hash

  • Fixed bug GH-12186 (segfault copying/cloning a finalized HashContext).

Intl

  • Fixed bug GH-12243 (segfault on IntlDateFormatter::construct).
  • Fixed bug GH-12282 (IntlDateFormatter::construct should throw an exception on an invalid locale).

MySQLnd

  • Fixed bug GH-12297 (PHP Startup: Invalid library (maybe not a PHP library) 'mysqlnd.so' in Unknown on line).

Opcache

  • Fixed opcache_invalidate() on deleted file.
  • Fixed bug GH-12380 (JIT+private array property access inside closure accesses private property in child class).

PCRE

  • Fixed bug GH-11956 (Backport upstream fix, PCRE regular expressions with JIT enabled gives different result).

SimpleXML

  • Fixed bug GH-12170 (Can't use xpath with comments in SimpleXML).
  • Fixed bug GH-12223 (Entity reference produces infinite loop in var_dump/print_r).
  • Fixed bug GH-12167 (Unable to get processing instruction contents in SimpleXML).
  • Fixed bug GH-12169 (Unable to get comment contents in SimpleXML).

Streams

  • Fixed bug GH-12190 (binding ipv4 address with both address and port at 0).

XML

  • Fix return type of stub of xml_parse_into_struct().
  • Fix memory leak when calling xml_parse_into_struct() twice.

XSL

  • Fix type error on XSLTProcessor::transformToDoc return value with SimpleXML.

Sockets

  • Fix socket_export_stream() with wrong protocol

Commit List

Anatol Belski

coppolafab

  • php_cli_server: ensure single date header is present in f6ac08c6a3

David Carlier

  • Fix GH-12243, segfault on IntlDateFormatter::construct with dateType set to UDAT_PATTERN but not timeType in 84c4336aa3
  • Fix GH-12282: IntlDateFormatter::construct should throw an exception is the locale field has an invalid value in a80db7b52a
  • Fix GH-12190: stream_context_create with address and port at 0 in d65c80031a

divinity76

  • support running testsuite with negative niceness in GH-11481

Dmitry Stogov

Florian Sowade

Ilija Tovilo

  • Fix filter_var with callback and explicit REQUIRE_SCALAR in c2fb10d2d2
  • Upgrade to macOS 12 in CI in 55ed7690f4
  • Fix getpriority test with negative return value in 181598d403
  • Fix SKIPIF jit test in 6e7e52de19
  • Minimal backport of 098d9ca in 36a87e6d32
  • Move Cirrus to nightly only, trigger on-demand in 92693a2286

Max Semenik

Mikhail Galanin

  • Invalidate path even if the file was deleted in f4ab494906

Niels Dossche

  • Fix GH-12170: Can't use xpath with comments in SimpleXML in 747335f100
  • Fix GH-12192: SimpleXML infinite loop when getName() is called within foreach in 4d888cf53f
  • Fix GH-12223: Entity reference produces infinite loop in var_dump/print_r in 39a9e561f9
  • Fix GH-12208: SimpleXML infinite loop when a cast is used inside a foreach in 486276f0f9
  • Fix GH-11956: PCRE regular expressions with JIT enabled gives different result in d61efdfe97
  • Fix bug #55098: SimpleXML iteration produces infinite loop in 1a4e401bf0
  • Fix GH-12215: Module entry being overwritten causes type errors in ext/dom (<= PHP 8.3) in da6097ffc8
  • Fix return type of stub of xml_parse_into_struct() in b1d9a8d321
  • Fix memory leak when calling xml_parse_into_struct() twice in 30f26b587a
  • Fix GH-12167 and GH-12169: Unable to get comment or processing instruction contents in SimpleXML in 82a84d0b7b
  • Fix GH-12297: PHP Startup: Invalid library (maybe not a PHP library) 'mysqlnd.so' in Unknown on line in 14fc3d1566
  • Fix GH-11997: ctype_alnum 5 times slower in PHP 8.1 or greater in 07811b6390
  • Restore old namespace reconciliation behaviour in e127f87114
  • Fix type error on XSLTProcessor::transformToDoc return value with SimpleXML in 2a7f23e9b9
  • Fix GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT in e72fc12058
  • Revert "Fix GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT" in 643c4ba417
  • Apply SimpleXML iterator fixes only on master in b842ea4fa8
  • Fix #80092: ZTS + preload = segfault on shutdown in bdc87b0f66
  • Fix test under older CI configurations in b140f6e9f8
  • Ignore optional warning output in test in 6cf76d552e
  • Fix Windows CI in ae52f1958d
  • Fix GH-12380: JIT+private array property access inside closure accesses private property in child class in fb6838770c
  • Fix GH-8996: DOMNode serialization on PHP ^8.1 in 24e5e4ec0d

Patrick Allaert

Thomas Hurst

Tim Düsterhus

  • Update GitHub Action workflows to actions/checkout@v4 in 45e60e585e

twosee

  • Fix socket_export_stream() with wrong protocol in b5da98b972

usarise

  • fileinfo: Backport svg detection patch in 1f5bea3452
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.