Hi
I'm writing from france cuz i'm having a big problem with apache and ldap. let me explain :
I would like to make an Apache server communicate in php with en openLDAP server (both servers are under win srv 2003), using LDAPS protocol.
In order to activate LDAPS on my openLDAP srv (srvLDAP), I created self signed certificates with openSSL. I got 3 files:
cacert.pem
srvLDAP.pem
srvLDAP.key
I configured my slapd.con file and ldap.conf fil (openLDAP side) like this:
slapd.conf
TLSCertificateFile ./ssl/srvLDAP.pem
TLSCertificateKeyFile ./ssl/srvLDAP.key
TLSCACertificateFile ./ssl/cacert.pem
ldap.conf
BASE <ma branche>
URI ldaps://srvLDAP/
TLS_CACERT ./ssl/cacert.pem
TLS_REQCERT demand
I launched my openLDAP service, and checked ldaps protocol was okay, using this command :
C:\Program Files\OpenLDAP>ldapsearch -b o=exemple,dc=fr -s sub -x -w pass-D
cn=admin,o=exemple,dc=fr -H ldaps://srvLDAP/
Now I would like, from the remote apache server, communicate with the openLDAP server using [b]LDAPS[/b] Protocol.
Here is my simplified PHP code
<h2>LDAP OPENLDAP LDAPS</h2>
<?php
$host="ldaps://srvldap";