Where to get php_mcrypt.dll for PHP 7.2?
Asked Answered
E

5

5

I need Mcrypt extension for my CMS to work. It's not distributed with PHP windows build, and I can't find any compiles. I downloaded sources, and compile php with key --enable-mcrypt=shared, but it show error:

Enabling extension ext\standard
Checking for mcrypt.h ...  <not found>
Checking for mcrypt.h ...  <not found>
WARNING: mcrypt not enabled; libraries and headers not found

Here is config.w32:

// $Id$
// vim:ft=javascript

ARG_WITH("mcrypt", "mcrypt support", "no");

if (PHP_MCRYPT != "no") {

    if (CHECK_HEADER_ADD_INCLUDE('mcrypt.h', 'CFLAGS_MCRYPT') &&
            CHECK_LIB('libmcrypt_a.lib;libmcrypt.lib', 'mcrypt') &&
            CHECK_LIB('Advapi32.lib', 'mcrypt')
            ) {

        EXTENSION('mcrypt', 'mcrypt.c mcrypt_filter.c', false, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
        AC_DEFINE('HAVE_LIBMCRYPT', 1);
        AC_DEFINE('HAVE_LIBMCRYPT24', 1);
    } else {
        WARNING("mcrypt not enabled; libraries and headers not found");
    }
}

It looks for mcrypt.h, but in which folder? And it is not in the mcrypt package file downloaded from PECL. Unfortunately I'm not familiar with C++ compiling

Epicurean answered 4/12, 2017 at 23:42 Comment(2)
On literally every mcrypt doc page: "Warning: This function has been DEPRECATED as of PHP 7.1.0 and REMOVED as of PHP 7.2.0. Relying on this function is highly discouraged."Moslem
I just want to run some old CMS without need of instalation of old PHP version. It's not for production, just for testing.Epicurean
A
7

http://php.net/manual/en/migration71.deprecated.php

The mcrypt extension has been abandonware for nearly a decade now, and was also fairly complex to use. It has therefore been deprecated in favour of OpenSSL, where it will be removed from the core and into PECL in PHP 7.2.

Amoebic answered 4/12, 2017 at 23:48 Comment(6)
"removed from the core and into PECL"? What does this mean? Can I still compile it?Epicurean
Yes, but I'm not familiar with how to compile a PECL extension on Windows. It's going to be different steps than compiling PHP core.Amoebic
xDebug and APCu compile well. But it looks like Mcrypt has specific dependencies and I can't find what they are. Don't you know where to download deps for Mcrypt?Epicurean
I don't use Windows, and the frameworks I use have ditched mcrypt because of its obsolescence, so no... I don't know where to get its dependencies.Amoebic
Usually the deps are in the PECL listing for the extension windows.php.net/downloads/pecl/releases/mcrypt but only see the logs. You may only need libmcrypt sourceforge.net/projects/mcrypt as per the documented requirements php.net/manual/en/mcrypt.requirements.phpGrillage
@fyrye Ok, mcrypt from PECL is located in E:\php-sdk\phpdev\vc15\x64\pecl\mcrypt , where to put the libmcrypt folder?Epicurean
D
5

I use the phpseclib/mcrypt_compat shim: composer require phpseclib/mcrypt_compat:*

Dunois answered 30/12, 2017 at 4:7 Comment(0)
K
0

if your PHP 7.2 then manually install mcrypt lib because deprecated and no loger support.

Prefer below link download dll file as of your system.

https://pecl.php.net/package/mcrypt/1.0.2

and also add php.ini:

extension=mcrypt

and check restart XAMPP/WAMP and you can check with this cmd package install or not (php -m)

Kirkland answered 21/5, 2020 at 3:38 Comment(0)
D
0

you can download php_mcrypt.dll to php 7.2.XX from here https://pecl.php.net/package/mcrypt/1.0.3/windows after that you could see this with a phpinfo.php enter image description here

Densitometer answered 17/8, 2020 at 21:6 Comment(1)
When adding an answer to an older question with existing answers it is important to point out what new aspect of the question your answer addresses that isn't covered by existing answers.Turmoil
V
-2

You can download the dll file from here http://www.dlldownloader.com/php_mcrypt-dll/

NB: The mcrypt extension is included in PHP 5.4 through PHP 7.1. It was removed from PHP 7.2 and moved to an unofficial PECL extension because the mcrypt library is no longer maintained. For PHP 7.2+, PHP instead uses libsodium as a cryptography library. ServerPilot builds PHP 7.2+ with the official libsodium extension.

Vi answered 24/7, 2019 at 10:31 Comment(1)
this cant help, consider checking your answerAnagrammatize

© 2022 - 2024 — McMap. All rights reserved.