从哪里获取 PHP 7.2 的 php_mcrypt.dll?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/47643803/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where to get php_mcrypt.dll for PHP 7.2?
提问by Audiophile
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:
我的 CMS 需要 Mcrypt 扩展才能工作。它不是随 PHP windows 构建一起分发的,我找不到任何编译。我下载了源代码,并使用密钥 --enable-mcrypt=shared 编译 php,但它显示错误:
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:
这是 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
它寻找 mcrypt.h,但在哪个文件夹中?并且它不在从PECL下载的mcrypt包文件中。不幸的是我不熟悉 C++ 编译
回答by ceejayoz
http://php.net/manual/en/migration71.deprecated.php
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.
mcrypt 扩展已经被废弃近十年了,而且使用起来也相当复杂。因此,它已被弃用,取而代之的是 OpenSSL,它将从核心中删除,并在 PHP 7.2 中进入 PECL。
回答by Mage2.PRO
I use the phpseclib/mcrypt_compat
shim:
composer require phpseclib/mcrypt_compat:*
我使用垫片:
phpseclib/mcrypt_compat
composer require phpseclib/mcrypt_compat:*
回答by Mitesh Sathvara
if your PHP 7.2then manually install mcrypt lib
because deprecated and no loger support.
如果您的PHP 7.2则手动安装,mcrypt lib
因为已弃用且不支持记录器。
Prefer below link download dll file as of your system.
更喜欢下面的链接下载 dll 文件作为您的系统。
https://pecl.php.net/package/mcrypt/1.0.2
https://pecl.php.net/package/mcrypt/1.0.2
and also add php.ini:
并添加php.ini:
extension=mcrypt
and check restart XAMPP/WAMP and you can check with this cmd package install or not (php -m
)
并检查重新启动 XAMPP/WAMP,您可以检查是否安装此 cmd 包 ( php -m
)
回答by Prasant Kumar
You can download the dll file from here http://www.dlldownloader.com/php_mcrypt-dll/
您可以从这里下载 dll 文件 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.
注意:mcrypt 扩展包含在 PHP 5.4 到 PHP 7.1 中。它已从 PHP 7.2 中删除并移至非官方 PECL 扩展,因为不再维护 mcrypt 库。对于 PHP 7.2+,PHP 使用 libsodium 作为加密库。ServerPilot 使用官方 libsodium 扩展构建 PHP 7.2+。