我无法连接到PHP的LDAPS服务器(第三方)(PHP 5.5.4,Apache 2.4,Windows 7 64bit)。当我尝试使用用户名和密码ldap_bind()
函数,我收到 - Unable to bind to server: Can't contact LDAP server.
无法连接到Windows 7 64位上的PHP 5.5.4的LDAPS服务器,Apache 2.4
我有LDAPS服务器的自签名证书,但我不知道在哪里把PEM文件(Base64)或类似conf .file(我已经阅读了许多答案,但没有任何适用于我的例子 - 例如c:\openldap\sysconf\ldap.conf
,TLS_REQCERT
从不等)。
发展文件夹是D:\WebDev
其中里面是\www
文件夹项目,并与\Apache
文件夹和文件夹\PHP
夹\binaries
。 PHP是Apache的一个模块,Apache由httpd.exe --standalone --console
启动。
Openssl s_client -connect xxxx -CAfile xxxx
以LDAPS服务器工作正常,返回码为0
。没有-CAfile
我fet code 19 (self-signed certificate in certificate chain)
。
没有SSL的LDAP对我来说工作正常,我试过一些免费的在线LDAP测试服务器。