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
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.
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".
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.
I use the phpseclib/mcrypt_compat
shim:
composer require phpseclib/mcrypt_compat:*
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With