I have a PHP compiled with ldap support and it is working as expected. Now, I need to do some configuration for SSL/TLS but I have no ldap.conf file.
php -i says it was
For XAMPP on Windows, the path is C:\openldap\sysconf\ldap.conf and place these two lines in the ldap.conf file:
TLS_REQCERT never TLS_CACERT {full_path_to_pem_file}\pem_file.pem
Restart web server and it worked for me.