note 122231 deleted from function.ldap-bind by cmb
| From: | cmb@php.net | Date: | Sun, 17 Nov 2019 09:10:15 +0000 |
| Subject: | note 122231 deleted from function.ldap-bind by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213127@lists.php.net to get a copy of this message | ||
Note Submitter: jan martens
----
If you are using Windows and PHP you might get the message:
PHP Warning: ldap_bind(): Unable to bind to server: Can't contact LDAP server
By enabling trace log (ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);) you might get:
TLS certificate verification: Error, self signed certificate in certificate chain
TLS trace: SSL3 alert write:fatal:unknown CA
If so you do __NOT__ need to disable certificate checking. You can simply create the file
c:\openldap\sysconf\ldap.conf (path can not be changed because it is hard coded in the dll) with
following content:
TLS_CACERT C:\openldap\cacert\your-cert.pem
TLS_CACERTDIR C:\openldap\cacert
And save your certificate as C:\openldap\cacert\your-cert.pem