INTEGRATING ACTIVE DIRECTORY WITH PHP-LDAP AND TLS ==================================================My configuration:Apache/2.2.14 (Win32) mod_ssl/2.2.14 OpenSSL/0.9.8k PHP/5.2.11NOTE 1: At the momment, the versión 5.3.1 fail with tlsNOTE 2: This example works on windows, but in linux is similar1) Download the Certificate X.509 (PEM format) from a web browser, I used Firefox. I put the name webcert.crt2) Create the folder c:\openldap\sysconf3) Copy the file webcert.crt to c:\openldap\sysconf4) With notepad you must create the file c:\openldap\sysconf\ldap.conf file. The file contents:TLS_REQCERT neverTLS_CACERT c:\openldap\sysconf\webcert.crt5) The code:<?php $ldap="ldap.myDomain.com"; $usr="user@myDomain.com"; $pwd="mypassword"; $ds=ldap_connect($ldap); $ldapbind=false; if(ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) if(ldap_set_option($ds, LDAP_OPT_REFERRALS, 0)) if(ldap_start_tls($ds)) $ldapbind = @ldap_bind($ds, $usr, $pwd); ldap_close($ds); if(!$ldapbind) echo "ERROR"; else echo "OK";?>