0

I am currently trying get my LDAP connection to work via SSL (LDAPS). I am using CakePHP and the plugin Queeencityofcodefactory and the hostapplication Wampserver64. The issue i am facing is that everything works with the ldap connection, but as soon as i change the port configuration or change from 'host' => 'ldap......' to 'ldaps://.....' then it is unable to bind to the server. I have tried configuring ports, the ldap_start_tls() in the plugincode but nothing works.

I also configure the app.php options with these values:

LDAP_OPT_X_TLS_REQUIRE_CERT => 0,
            LDAP_OPT_X_TLS_CACERTDIR => "C:/wamp64/bin/apache/apache2.4.39/conf/cert/cert.01",
            LDAP_OPT_X_TLS_CACERTFILE => "cert01.crt",
            LDAP_OPT_X_TLS_KEYFILE  => "C:/wamp64/bin/apache/apache2.4.39/conf/cert/key1.key",

When i try to connect to the LDAP host via LDP.exe it works fine with no issues.

I would be grateful for any tips regarding this issue.

  • If you want to use this for authentication then have a look at the official plugin that features LDAP as well https://github.com/cakephp/authentication – floriank Jan 27 '20 at 23:10
  • I am sorry but i dont understand this comment. I have a fully functional login already but this does not work with port 636 or Ldap_start_tls. I get the error message that "LDAP_bind(): Unable to bind to server: Can't contact LDAP Server". This is fully functional without the LDAP_start_tls function and without port 636. It simply works on port 389 without any issues. – Ninjabullen Jan 28 '20 at 07:33

0 Answers0