Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to get php_mcrypt.dll for PHP 7.2?

Tags:

php

pecl

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

like image 912
Audiophile Avatar asked Dec 04 '17 23:12

Audiophile


People also ask

How can you install the Php_mcrypt dll file?

Copy the "Php_mcrypt. dll" file you extracted and paste it into the "C:\Windows\System32" folder. If your system is 64 Bit, copy the "Php_mcrypt. dll" file and paste it into "C:\Windows\sysWOW64" folder.

How do I know if mcrypt is installed?

You can also achieve this same screen by viewing a php file that has: phpinfo(); somewhere in the code. In this screen, simply search for the string "mcrypt support". If installed, you will see a box that says "enabled".


3 Answers

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.

like image 172
ceejayoz Avatar answered Nov 10 '22 04:11

ceejayoz


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

like image 29
Dmitry Fedyuk Avatar answered Nov 10 '22 05:11

Dmitry Fedyuk


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

like image 26
fatandaz Avatar answered Nov 10 '22 03:11

fatandaz