php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80459 pecl/mcrypt is not compatible with PHP version 8.0.0
Submitted: 2020-12-02 00:23 UTC Modified: 2021-12-13 16:37 UTC
From: julien dot maurz at gmail dot com Assigned: nikic (profile)
Status: Closed Package: mcrypt related
PHP Version: 8.0.0 OS: FROM php:8.0.0-apache-buster
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: julien dot maurz at gmail dot com
New email:
PHP Version: OS:

 

 [2020-12-02 00:23 UTC] julien dot maurz at gmail dot com
Description:
------------
I use official image docker "php:8.0.0-apache-buster"

I actually need mcrypt on my current production servers stack.

I wanted to test and bench php8.0.0 but the installation of mcrypt fails at the beginning: "pecl/mcrypt is not compatible with PHP version 8.0.0"


But the package description https://pecl.php.net/package/mcrypt says that it is supposed to be compatible : "PHP Version: PHP version 8.0.0 or older"

Test script:
---------------
apt-get install -y libmcrypt-dev
pecl update-channels
pecl install mcrypt-1.0.3


Expected result:
----------------
installation ok

Actual result:
--------------
pecl/mcrypt is not compatible with PHP version 8.0.0

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-12-02 01:09 UTC] requinix@php.net
It's a bit weird, but the configuration is

<php>
  <min>7.2.0</min>
  <max>8.0.0</max>
  <exclude>8.0.0</exclude>
</php>

which effectively means it's compatible with >=7.2.0 and <8.0.0 (aka 7.2-7.4).
So it isn't actually compatible with 8.0 yet.

Though it looks like there's been some recent activity to add support...

But please, 8.0 was *just* released. People and (non-core) extensions need time to catch up. Be patient.
 [2020-12-02 10:17 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2020-12-02 10:17 UTC] nikic@php.net
mcrypt 1.0.4 with support for PHP 8 has been released.

Please note that mcrypt is not actively maintained and may not be supported for future PHP versions.
 [2021-12-13 12:58 UTC] ataryx at hotmali dot com
Same here, PHP 8.1.0, latest mcrypt 1.0.4

To reproduce, build the following Dockerfile:

FROM php:fpm

RUN apt-get update && apt-get install -y libmcrypt-dev

RUN pecl update-channels && pecl install mcrypt-1.0.4 && docker-php-ext-enable mcrypt
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 31 16:00:03 2025 UTC