我使用的PHP框架需要OpenSSL来实现各种功能,但在执行与OpenSSL相关的任何操作时,我会收到以下错误:"在DLL文件C:''wamp64''bin''apache2.4.17''bin''OpenSSL.exe中找不到序号372"。
我根本不知道该怎么纠正,我已经到处找了。我很感激你的帮助,因为我不知道如何解决这个问题。
要解决这个问题,需要两件事:
1) 确保Apache bin目录中没有libeay32.dll和ssleay32.dll的符号链接(例如,我的是:C:''wamp64''bin''apache2.4.23''bin)
如果您确实有符号链接(即文件大小为0字节),则需要从Apache Lounge下载dll。例如,我从64位版本的Apache 2.4.23中获取了两个.dll文件,托管在https://www.apachelounge.com/download/
2) 一旦你恢复了实际的.dll文件,你需要确保WampServer没有覆盖它们。WampServer3有一个配置脚本,每次启动时都会运行。在该脚本中,它将用符号链接覆盖那些.dll。您必须禁用该功能。为此,请在C:''wamp64''scripts''config.inc.php中注释掉对这两个文件的引用(我的位于第133和139行)。
这应该允许您在Apache中启用mod_ssl模块。在启用mod_ssl的情况下正确引导Apache之后,您还需要取消注释"Include-conf/external/httpd-ssl.conf"。(但是,您可能需要删除其中的大部分内容,然后重新开始,因为其中包含许多硬编码路径和错误)
"在DLL文件C:''wamp64''bin''apache''apache2.4.17''bin''openssl.exe中找不到序号372"
我推测它的PEM_SealInit
或SSL_CONF_cmd_argv
来自OpenSSL 1.0.2;或者来自OpenSSL 1.1.0的CCD_ 3或CCD_。
# OpenSSL 1.1.0
$ find $PWD -type f -iname '*.num' -exec grep " 372" {} ';
ASN1_i2d_fp 372 1_1_0 EXIST::FUNCTION:STDIO
SSL_SESSION_set1_id_context 372 1_1_0 EXIST::FUNCTION:
...
# OpenSSL 1.0.2
$ find $PWD -type f -iname '*.num' -exec grep " 372" {} ';
PEM_SealInit 372 EXIST::FUNCTION:RSA
SSL_CONF_cmd_argv 372 EXIST::FUNCTION:
...
您需要使用dumpbin
或Dependency Walker进行验证。另请参阅如何从序数中找到导出的函数名(按序数导出)?堆栈溢出。
序数是使用<openssl src>'util'mkdef.pl
创建的。您可以从OpenSSL的GitHub中看到源代码。这里是1.0.2,这里是1.1.0。
以下是文件的标题注释:
#!/usr/local/bin/perl -w
#
# generate a .def file
#
# It does this by parsing the header files and looking for the
# prototyped functions: it then prunes the output.
#
# Intermediary files are created, call libcrypto.num and libssl.num,
# The format of these files is:
#
# routine-name nnnn vers info
#
# The "nnnn" and "vers" fields are the numeric id and version for the symbol
# respectively. The "info" part is actually a colon-separated string of fields
# with the following meaning:
#
# existence:platform:kind:algorithms
#
# - "existence" can be "EXIST" or "NOEXIST" depending on if the symbol is
# found somewhere in the source,
# - "platforms" is empty if it exists on all platforms, otherwise it contains
# comma-separated list of the platform, just as they are if the symbol exists
# for those platforms, or prepended with a "!" if not. This helps resolve
# symbol name variants for platforms where the names are too long for the
# compiler or linker, or if the systems is case insensitive and there is a
# clash, or the symbol is implemented differently (see
# EXPORT_VAR_AS_FUNCTION). This script assumes renaming of symbols is found
# in the file crypto/symhacks.h.
# The semantics for the platforms is that every item is checked against the
# environment. For the negative items ("!FOO"), if any of them is false
# (i.e. "FOO" is true) in the environment, the corresponding symbol can't be
# used. For the positive itms, if all of them are false in the environment,
# the corresponding symbol can't be used. Any combination of positive and
# negative items are possible, and of course leave room for some redundancy.
# - "kind" is "FUNCTION" or "VARIABLE". The meaning of that is obvious.
# - "algorithms" is a comma-separated list of algorithm names. This helps
# exclude symbols that are part of an algorithm that some user wants to
# exclude.
我刚刚在Windows上遇到了同样的问题,使用的是xampp而不是Wamp。
按照本页评论中描述的操作解决了这个问题:PHP cURL安装。
我将3个.dll
文件从PHP安装目录复制到apache/bin
目录,然后重新启动xampp。