我在 Windows Server 2016 上有一个 Laravel 应用程序,带有 IIS 10 和 PHP 7.2。
该应用程序需要执行 Active Directory 身份验证。为此,我使用https://github.com/Adldap2/Adldap2-Laravel。身份验证适用于在端口 3268 上与公司 DC 的常规 LDAP 连接,但是当我启用 SSL 并将其连接到端口 3269 或 636 时,当我的代码到达 ldap_bind( )。
我知道 SSL 在 DC 上工作,因为我可以使用 ldp.exe 工具在同一台服务器上连接。
这是我在应用程序中用于身份验证的配置(使用默认登录控制器)
LDAP_HOSTS='dc.example.corp.com'
LDAP_PORT=636
LDAP_BASE_DN=''
LDAP_USE_SSL=true
LDAP_USE_TLS=false
LDAP_USERNAME=######################
LDAP_PASSWORD=############
我通常在我的公共目录中使用以下代码对文件进行测试:
$a = ldap_connect("ldaps://dc.example.corp.com:636");
ldap_set_option($a, LDAP_OPT_PROTOCOL_VERSION, 3); // v3 = UTF8 encoding
ldap_set_option($a, LDAP_OPT_REFERRALS, 0);
$r=ldap_bind($a);
echo "-$r-";
我也尝试使用 DebugDiag 进行调试,但是在分析崩溃创建的转储时,它返回以下错误:
Description Recommendation
WARNING - DebugDiag was not able to locate debug symbols for \libcrypto-1_1.dll, so the information below may be incomplete.
In php__PID__6684__Date__11_28_2019__Time_10_24_08AM__912__Second_Chance_Exception_C0000005.dmp the assembly instruction at libcrypto_1_1!CRYPTO_memcmp+29530 in C:\Program Files (x86)\PHP\v7.2\libcrypto-1_1.dll from The OpenSSL Project, https://www.openssl.org/ has caused an access violation exception (0xC0000005) when trying to read from memory location 0x2a4b6fe0 on thread 0
Please follow up with the vendor The OpenSSL Project, https://www.openssl.org/ for C:\Program Files (x86)\PHP\v7.2\libcrypto-1_1.dll
还有数百行说同样的话:
libcrypto_1_1!CRYPTO_memcmp+29594
到目前为止,我不知道问题出在哪里,并且不确定如何进行。