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
See http://php.net/manual/en/function.ldap-connect.php#36156:
You also need to place those same settings in a file within the Apache Web user homedir called .ldaprc e.g.: cp /usr/local/openldap/etc/openldap/ldap.conf ~www/.ldaprc )
The apache web server root directory is the key here, as well as .ldaprc
.
Also see the official ldap man pages:
Users may create an optional configuration file, ldaprc or .ldaprc, in their home directory which will be used to override the system-wide defaults file. The file ldaprc in the current working directory is also used.