Spleshmen Posted October 11, 2010 Share Posted October 11, 2010 First i want to say hello all,second i need your help i am trying to connect to a ldaps server from another server. i got all the information i need to connect to the ldaps server (host,port,password,bind_rdn - second parameter from ldap_bind,base_dn - second parameter from ldap_search) and 2 certificates the SSL CA and Root CA generated from the ldaps server. i never used the data from the certificates on the server i am trying to make the connection with the ldaps server.could that be the reason why i cant establish a connection? here is my code : $config = array( 'host' => 'ldaps://***.com', 'port' => some int 'bind' => 'uid=*,dc=**,dc=**,dc=**', 'pass' => '**', 'dbase' => 'dc=**,dc=**,dc=**' ); $c = ldap_connect($config['host'],$config['port']); if ($c==FALSE) { echo 'Error ldap_connect'; } else { $action = ldap_bind($c,$config['bind'],$config['pass']); if ($action==FALSE) { echo 'LDAP bind fail <br/> '; echo 'ldap_error : <b>'.ldap_error($c).'</b> <br/>'; else { echo 'LDAP bind true'; } } the error i am getting is Can't contact LDAP server thats about it ... thanks Link to comment https://forums.phpfreaks.com/topic/215612-ldaps-connection-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.