Windowsを使用してセキュアなLDAPサーバーに接続する際に問題が発生しています。LDAPSがPHPと接続していません
私はIISとWAMPSERVERの両方を使用しようとしました。 libeay32.dllとssleay32.dllを私のSYSTEM32ディレクトリに置き、LDAP拡張を有効にしました。ここで
は私のコードです:
putenv('LDAPTLS_REQCERT=never');
ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
$resource = ldap_connect("ldaps://{redacted}/", 636) or die ("Could not connect.");
ldap_set_option($resource, LDAP_OPT_PROTOCOL_VERSION, 3)
$bound = ldap_bind($resource, "{redacted}\ldap", "****");
echo ldap_error($resource);
私はldap_errorからCan't contact LDAP server
を取得し、PHPは、私がに接続しようとしていますサーバーがActive Directoryを実行していると私は私が接続できることを確認したWarning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server in C:\wamp\www\ldapTest.php
を警告します他のLDAPツールを使用します。私はこのサーバに証明書の問題があることを知っています。私が使っているLDAPツールは、The server you are trying to connect to is using a certificate which could not be verified! - Issuer certificate not found
です。
私の疑念は、LDAPTLS_REQCERT = neverを試した理由です。
答えはありがたいですが、残念ながらこれは私のためには機能しませんでした。 – Sam