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 https://github.com/php/php-src.git --depth 1 --branch php-8.1.8
./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
Docker/Podman Containers
docker pull php:8.1.8-cli-alpine
docker pull php:8.1.8-cli
docker pull php:8.1.8-fpm-alpine
docker pull php:8.1.8-apache
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
- Fixed bug #81723 (Heap buffer overflow in finfo_buffer). (CVE-2022-31627)
FPM
- Fixed bug #67764 (fpm: syslog.ident don't work).
GD
- Fixed
imagecreatefromavif()
memory leak.
MBString
mb_detect_encoding
recognizes all letters in Czech alphabetmb_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 6a4b6d2344mb_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
- Update NEWS with
mb_detect_encoding
changes in cc599c299e - Fix #76452: Crash while parsing blob data in firebird_fetch_blob in a6a13139db
- Fix date on PHP 8.1.7 release in 59a3de3786
- Update versions for PHP 8.1.8 in 8d84e44e7b
Calvin Buckley
- Fix handling of single-key connection strings in 445d9502bf
Chen
- Add IBT support for fiber in 040a37d3f1
Christoph M. Becker
- Fix test to require PDO_Firebird in a528571cec
- Fix #81720: Uninitialized array in
pg_query_params()
leading to RCE in 55f6895f4b - Fix test case in 8e2378a4e0
- Fix recently broken test case in f768f3d60b
- Fix
imagecreatefromavif()
memory leak in 036bed01ce - Fix GH-8778: Integer arithmethic with large number variants fails in 651e0cc187
- Fix GH-8827: Intentionally closing std handles no longer possible in a8437d08a8
- Fix bad merge (b8dee9b3) in 7e8ad578ab
- Fix #81723: Memory corruption in
finfo_buffer()
in 0b67277907
David Carlier
- Revert "Fix detection of unknown gcc function attributes" in 0a47fdf538
Derick Rethans
- Fixed bug #76963 (Null-byte injection in createFromFormat) in dfd1d7a531
- Fixed bug #72963 (Null-byte injection in CreateFromFormat and related functions) in 2dcd82162e
- Fixed tests in 209ea3ffc7
- Update NEWS in 172b7345b1
- Fixed bug #74671 (DST timezone abbreviation has incorrect offset) in 6418eba1cd
- Mark test as
XFAIL
due to wrong assumptions in 8d6a828192 - Remove trailing whitespace from test in 63a31f3377
- Update NEWS in 8.1 too in f36ccdb2ed
- Fixed bug #78139 (timezone_open accepts invalid timezone string argument) in d5e57268a9
- Update NEWS in 8.1 too in 38669f5df3
- Bump version in 7.4 to 7.4.31-dev in 8fbeadcd45
- Fixed bug #77243 (Weekdays are calculated incorrectly for negative years) in 36990aab8e
- Skip tests on 32-bit in b23dfe4986
Dmitry Stogov
- Fix memory leak in 3a8912fb7c
- Fix type inference in b86c6245cc
- Fix memory leak in 088e5677fb
- Fix type inference in 1b45efb6fb
- Fix type inference in 729be469ae
- Fix use after free in 0b8e471b3c
- JIT: Fix missing register store in 1cd8074743
- JIT: Fix incorrect reference-counting in 971b07ea60
- Fix memory leak in 229e80c6ef
George Peter Banyard
- PDO Common tests should not require a driver in 938049b927
- Fix GH-8691 Add required extensions for redirected tests in c05c96b3fe
- Backport fcba0a49 in 52eb52d652
- Fix GH-8563 Different results for
seek()
on SplFileObject and SplTempFileObject in 6f87a5c633 - Revert "Fix GH-8563 Different results for
seek()
on SplFileObject and SplTempFileObject" in 1e7afbd281
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
- Fix bug #50293 and #81713: file path checking in OpenSSL functions in b765d4cd41
- Pass signature to openssl_verify in bug81713 test in cb9a48a0c5
- Fix and improve OpenSSL VCWD path checking test for bug #50293 in 2f78c1f9d9
- Fix bug #67764: fpm: syslog.ident does not work in e330f443c9
- Fix strict prototype for
php_closelog
in d9cca443ad
Kamil Tekiela
- Remove mysqli_close from clean_table.inc in 7d65cc81f8
Matteo Beccati
- Fixed test in b90201745f
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
- Bump for 8.1.8-dev in 3b6ee1eb19
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
- use sha256 in openssl test suite in 03a4ccd912
- Fix GH-8685 mbstring requires pcre in 2eb2f9d74f
- NEWS for GH-8685 in ae8c2bc1ce
- NEWS for GH-8685 in c9ec5cfd27
- Fix GH-8781
ZipArchive::close
deletes zip file without updating stat cache in 390538af2e - NEWS in 26feb2e6f2
- NEWS in e3c5237b4f
Sara Golemon
- Verify internal types before abandoning call frame in 01d84545e7
Stanislav Malyshev
- Fix bug #81719: mysqlnd/pdo password buffer overflow in 58006537fc
- Update NEWS in d1be9369ad
- Update NEWS in a0f479f0b6
Yurun
- Closes GH-8626: Fix PDOStatement->execute() failed in df52903ee0
- Fix dblib ghtest8626 test in bfe63f565f