我的 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
这是 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");
}
}
它寻找 mcrypt.h,但在哪个文件夹中?而且它不在从 PECL 下载的 mcrypt 包文件中。不幸的是我不熟悉 C++ 编译
最佳答案
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.
关于php - 从哪里获得 PHP 7.2 的 php_mcrypt.dll?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47643803/