Where to get php_mcrypt.dll for PHP 7.2?

Audiophile picture Audiophile · Dec 5, 2017 · Viewed 25.7k times · Source

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

Answer

ceejayoz picture ceejayoz · Dec 5, 2017

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.