PHP 8.1.12: Downloads, Changelog, News

Release Information

Release
8.1.12
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.12 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.12 tag from the PHP Git repository.
git clone https://github.com/php/php-src.git --depth 1 --branch php-8.1.12
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.12-cli-alpine

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

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

ChangeLog

Core

  • Fixes segfault with Fiber on FreeBSD i386 architecture.

Fileinfo

  • Fixed bug GH-8805 (finfo returns wrong mime type for woff/woff2 files).

GD

  • Fixed bug #81739: OOB read due to insufficient input validation in imageloadfont(). (CVE-2022-31630)

Hash

MBString

  • Fixed bug GH-9683 (Problem when ISO-2022-JP-MS is specified in mb_ encode_mimeheader).

Opcache

  • Added indirect call reduction for jit on x86 architectures.

Session

  • Fixed bug GH-9583 (session_create_id() fails with user defined save handler that doesn't have a validateId() method).

Streams

  • Fixed bug GH-9590 (stream_select does not abort upon exception or empty valid fd set).

Commit List

Alex Dowad

  • Restore backwards-compatible mappings of U+005C and U+007E to SJIS-2004 in dd00e2f1e3
  • In legacy text conversion filters, reset filter state in 'flush' function in 5812b4fe54
  • Add regression test for problem with mb_encode_mimeheader reported as GH-9683 in faa5425b0f

Anatol Belski

  • fileinfo: magic: Backport mime type support for woff/woff2 fonts in 34fa65a6c2
  • NEWS: Add entry for GH-8805 in 54701ea3e7
  • fileinfo: tests: Disable times sensitive tests on debug build in cab2f05f5a

Andy Postnikov

  • Make socket path shorter for ext/sockets/tests/socketcmsg{rights|credentials}.phpt in c58241a003

Arnaud Le Blanc

  • Return immediately when FD_SETSIZE is exceeded in GH-9602

Athos Ribeiro

  • Revert unintended test expectation change in e6a822d437

Ben Ramsey

Christoph M. Becker

  • Fix #81726: phar wrapper: DOS when using quine gzip file in 404e8bdb68
  • Work around dl(mysqli) issue with OPcache on AppVeyor in bfb4ee7c98
  • Fix regression introduced by fixing bug 81726 in 432bf196d5
  • Fix new bug81726.phpt for PHP 8.0 in 809176dab0
  • Use --EXTENSIONS-- section for newly added tests in 47c79a97f5
  • gh9590.phpt requires ext/posix in 48ae3a0e3f
  • Fix #81739: OOB read due to insufficient validation in imageloadfont() in ac45ce85c8

David Carlier

  • fix php_init_crypt_r/php_shutdown_crypt_r signatures warning in 257f108924
  • Fix GH-9566: disable assembly for Fiber on FreeBSD i386 in be53e5e5bb

Derick Rethans

  • Fix #81727: Don't mangle HTTP variable names that clash with ones that have a specific semantic meaning in 0611be4e82
  • Merge timelib 2021.17 in 4a5202293b
  • Fixed #9165: strtotime translates a date-time with DST/non-DST hour differently based on default timezone in e5b4624b8b
  • Add 'const' to match actual API in dd365b044a
  • Add CVEs in 6f586ef90f
  • Prepare for 7.4.32 in 0b4e153394
  • Prepare for next release in ad8d00b47b
  • Updated to version 2022.4 (2022d) in d16b5d3803
  • Empty merge in 0841b5af33
  • Updated to version 2022.4 (2022d) in 0360e62cae

Dmitry Stogov

  • Fix memory leak in 8a1f7fa721
  • Reorder conditions to avoid valgrind "Conditional jump or move depends on uninitialised value" warning in e488f7b0eb
  • Intern string values of internal classes to prevent their future interning during inheritance in 3a46f9fd1d
  • Fix memory leak in 8258b7731b
  • Fix memory leak in c083efb779
  • Wrap JIT compiler with zend_try to recover in case of memory overflow in 2568db287d
  • Keep original EG(jit_trace_num) value around __autoload() in f7d0a3e0e0
  • Force exit to VM in aa179bf3dd
  • Fix abstract trace consisency for FE_FETCH instruction in 5ca4113386
  • Fix register allocation (missing store) in ed652a514f
  • Fix typo in 072dc3c857
  • Fix GH-9697: array_walk($ffiInstance, function () {}) crashes due to expecting mutable array in d9651a9419
  • Fix crashes after opcache restart in c5364b851a

Gabriel Caruso

George Peter Banyard

Ilija Tovilo

  • Skip nightly coverage job in forks in 0451eded79
  • Migrate community job to GitHub actions in e10961b27f
  • Move Opcache variation job to GitHub actions in 1bef2e5108
  • Migrate MSAN build to GitHub actions in 9377c30577
  • Migrate --repeat 2 job to GitHub actions in 2cf7d70e53
  • Migrate variation job to GitHub actions in 90b437229f
  • Migrate libmysqlclient job to GitHub actions in 1ee5b65f09
  • Remove symfony and laravel from PHP-8.0 community job in afcaf3bd86
  • Remove unused azure pipelines templates in a9c66f0064
  • Remove unused azure pipelines files from PHP-8.1 branch in 1265115640
  • Backport community build to PHP-8.0 branch in b655451439
  • Switch to sanitize CFLAGS for community build in 12afd0cba8
  • Fix invalid label before } in 0aa5adb143
  • Fix PHP-8.0 skipping for some jobs in 958955e62a
  • Skip some OCI tests with repeat in 93e509fd8c
  • Fix PHP-8.0 skipping for community steps in 03a48b1209
  • And also update the branch ref in f518ae50aa
  • Skip Symfony preloading for PHP-8.0 in f49709a544
  • [skip ci ] Rename matrix-include output on old branches in f3dba7e642
  • Add empty default params to nightly linux matrix in 26499f53fb
  • Increase job timeout for ASAN/UBSAN build in 2c8f2e9349

Jakub Zelenka

  • Rework FPM tests logging for better debugging in 1e8fa6607d
  • Improve CS in FPM Tester Response in 1ed4303957
  • Do not check X-Powered-By header in FPM tester if expose_php off in 8e1cef4341

Michael Voříšek

  • Prepare for Windows CI with Github Actions in b43e49437c

Remi Collet

Sara Golemon

Stanislav Malyshev

wxue1

  • Indirect call reduction for Jit code in 52f4ed16e0
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 💜