[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: LDAP ssl over PHP
You will need to rebuild php and add --with-openssl to the ./configure
command in order to get this to work. Obviously, you must also have all
the openssl source installed too.
If you are on debian woody, i have some notes on how to do this using
debian tools (apt-get source and dpkg-buildpackage). Let me know if
you'd like me to send you a copy of what i've written up.
~c
Informations wrote:
>
> 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"
>
> Thanks for your help