Bug #17738 Updated: SSL support for LDAP

From: Date: Thu, 13 Jun 2002 14:28:14 +0000
Subject: Bug #17738 Updated: SSL support for LDAP
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10352@lists.php.net to get a copy of this message
 ID:               17738
 Updated by:       sander@php.net
-Summary:          ldap_bind for ldaps://server
 Reported By:      benoit@gide.net
 Status:           Open
-Bug Type:         LDAP related
+Bug Type:         Feature/Change Request
 Operating System: Redhat 6.2 7.1 7.2
 PHP Version:      4.2.1
 New Comment:

I don't think PHP supports LDAP over SSL. Making this a feature
request, and updating summary.


Previous Comments:
------------------------------------------------------------------------

[2002-06-13 06:01:35] benoit@gide.net

Compiled modules:
./configure --with-apache=../apache_1.3.24 --with-openssl --with-ldap


I have a problem when i use php to bind my ldap directory over ssl

If i use on shell command
ldapsearch -x -H 'ldaps://localhost/' -b 'uid=100000, ou=company,
dc=domain, dc=com'  -D 'uid=100000, ou=company, dc=mydomain, dc=com'
-W
I have good result


My script is like that :

$server = "ldap://localhost" ;
$ds=ldap_connect($server);
$dn = "uid=100000, ou=company, dc=domain, dc=com";
$value = "password";

$result=@ldap_bind($ds,$dn,$value);
$dn = "ou=company, dc=domain, dc=com";
$filtre = "(cn=*DUPONT*)";
$sr = ldap_search($ds, $dn, $filtre);
$info = ldap_get_entries($ds, $sr);

for ($i=0; $i < $info["count"]; $i++) {
     print "UID: ".$info[$i]["urn"][0]."<br /><br />";
}

ldap_close($ds);



i have a result, but if i change $server = "ldap://localhost" by
"ldaps://localhost) i have a error message "Can't contact LDAP server"


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=17738&edit=1



Thread (13 messages)

« previous php.bugs (#10352) next »