PHP 8.1.8: Downloads, Changelog, News

Release Information

Release
8.1.8
PHP Version
PHP 8.1
Release Date
Release Type
Security Update
Release Status
Use PHP 8.1.30 instead
Branch Status
Security-Fixes Only

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

Downloads

Source Code

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

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

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

ChangeLog

Core

  • Fixed bug GH-8338 (Intel CET is disabled unintentionally).
  • Fixed leak in Enum::from/tryFrom for internal enums when using JIT
  • Fixed calling internal methods with a static return type from extension code.
  • Fixed bug GH-8655 (Casting an object to array does not unwrap refcount=1 references).
  • Fixed potential use after free in php_binary_init().
  • Fixed bug GH-7942 (Indirect mutation of readonly properties through references).

CLI

  • Fixed GH-8827 (Intentionally closing std handles no longer possible).

COM

  • Fixed bug GH-8778 (Integer arithmethic with large number variants fails).

Curl

  • Fixed CURLOPT_TLSAUTH_TYPE is not treated as a string option.

Date

  • Fixed bug #72963 (Null-byte injection in CreateFromFormat and related functions).
  • Fixed bug #74671 (DST timezone abbreviation has incorrect offset).
  • Fixed bug #77243 (Weekdays are calculated incorrectly for negative years).
  • Fixed bug #78139 (timezone_open accepts invalid timezone string argument).

Fileinfo

FPM

  • Fixed bug #67764 (fpm: syslog.ident don't work).

GD

  • Fixed imagecreatefromavif() memory leak.

MBString

  • mb_detect_encoding recognizes all letters in Czech alphabet
  • mb_detect_encoding recognizes all letters in Hungarian alphabet
  • Fixed bug GH-8685 (pcre not ready at mbstring startup).
  • Backwards-compatible mappings for 0x5C/0x7E in Shift-JIS are restored, after they had been changed in 8.1.0.

ODBC

  • Fixed handling of single-key connection strings.

OPcache

  • Fixed bug GH-8591 (tracing JIT crash after private instance method change).

OpenSSL

  • Fixed bug #50293 (Several openssl functions ignore the VCWD).
  • Fixed bug #81713 (NULL byte injection in several OpenSSL functions working with certificates).

PDO_ODBC

  • Fixed handling of single-key connection strings.

Zip

  • Fixed bug GH-8781 (ZipArchive::close deletes zip file without updating stat cache).

Commit List

Alex Dowad

  • mb_detect_encoding recognizes all letters in Czech alphabet in 6a4b6d2344
  • mb_detect_encoding recognizes all letters in Hungarian alphabet in 58d0aad75c
  • Restore backwards-compatible mappings of 0x5C and 0x7E in SJIS in 2dc9026cbc

Arnaud Le Blanc

  • Add JIT guards for INIT_METHOD_CALL when the method may be modified in GH-8600

Athos Ribeiro

  • Fix detection of unknown gcc function attributes in 813d942bac

Ben Ramsey

Calvin Buckley

  • Fix handling of single-key connection strings in 445d9502bf

Chen

Christoph M. Becker

David Carlier

  • Revert "Fix detection of unknown gcc function attributes" in 0a47fdf538

Derick Rethans

Dmitry Stogov

George Peter Banyard

Heiko Weber

  • FPM: Fix use after free in fpm_evaluate_full_path in a83363e361
  • Fix potential use after free in php_binary_init() in 93a44f8c50

Ilija Tovilo

  • Fix Enum::from/tryFrom memory leak in JIT for internal enums in 93fc88e808

Jakub Zelenka

Kamil Tekiela

  • Remove mysqli_close from clean_table.inc in 7d65cc81f8

Matteo Beccati

Máté Kocsis

  • Get rid of invalid assertion and cleanup zend_call_method in 6d96f39a68
  • Verify if generated func info is up-to-date in 0c3b411c6b
  • Add missing EXTENSIONS section to new test in f17a8a5aed

Nicolas Grekas

  • Fix RC=1 references of declared properties when casting objects to arrays in 96e3a9d316

Patrick Allaert

Pierrick Charron

  • Fix LONG_CHECK_VALID_INT in socket extension in e2d55f2f12
  • Fix bad integer promotion in mysqlnd big5 charset detection in df4dd82ea0
  • Fixed CURLOPT_TLSAUTH_TYPE is not treated as a string option in d84b972658

Remi Collet

Sara Golemon

  • Verify internal types before abandoning call frame in 01d84545e7

Stanislav Malyshev

Yurun

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.

Support PHP.Watch — If you find the articles, version information, Codex, and other PHP.Watch contributions useful, consider supporting through GitHub Sponsors. Your sponsorship helps dedicate more time to creating valuable content and improving the PHP community. Together, we can keep the momentum going — thank you for your support!

Thanks to the highest tier sponsor: @TomasVotruba for your generous support to keep PHP.Watch moving 💜