connection to SSL enabled ldap problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all
I am having a problem in connection to an SSL enabled ldap server.
In localhost is easily connects to the ldap server with SSL but if try to
connect remotely then it cannot bind to ldap server but can connect.

In the slapd.conf I added the 3 lines to enable SSL
TLSCACertificateFile /usr/local/openssl/misc/demoCA/cacert.pem
TLSCertificateFile /usr/local/openssl/misc/server-cert.pem
TLSCertificateKeyFile /usr/local/openssl/misc/server-key.pem

and then restarted the ldap which is also working in 636 port.

Currently its working in default port without SSL but whenever use the ssl
then it gives the message :
"Could not bind to ldap database"

I have installed the rpms and in phpinfo there is a --with-ssl option too.
Though I have generated the CA and server certificates with compiled
openssl.

Here is ldapconnect code;
<?php
// Ldap bind user credentials
$LDAP_Auth_User = "cn=Manager,dc=example,dc=com";
$LDAP_Auth_PWD = "password";

// Connecting to ldap server
$ldapconnect = ldap_connect ("ldaps://dc.example.com") or die ("Cannot
Connect to OpenLDAP Server");

// Checking whether ldap connection is successful
if ($ldapconnect) {
$bindldap = ldap_bind($ldapconnect,$LDAP_Auth_User, $LDAP_Auth_PWD) or die
("Could not bind to LDAP Database");
}
?>

Any idea.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux