LDAPS not connecting with PHP

后端 未结 2 724
旧时难觅i
旧时难觅i 2021-01-20 09:42

I\'m having issues using Windows to connect to a secure LDAP server, and I see the same thing everywhere online with no solution thats worked so far.

I have tried us

相关标签:
2条回答
  • 2021-01-20 10:14

    I can't recall where I found this one article; however I found out that by default even if you specify the TLS_REQCERT never it is ignored.

    What I found out / then forgot about and found out again is you need to do the following (for windows machines)

    1. Create the following directory structure on your drive c in the root c:\OpenLDAP\sysconf (create the two folders)
    2. Inside the sysconf folder create a text file called "ldap.conf"
    3. In the text file you created put the following on the first line and then save "TLS_REQCERT never" (Without the quotes)
    4. Restart Apache and it should work now.

    Give it a try. and good luck!

    0 讨论(0)
  • 2021-01-20 10:22

    You can try changing the following line:

    $resource = ldap_connect("ldaps://{redacted}/", 636)
    

    To use your port number directly in the URI instead

    $resource = ldap_connect("ldaps://{redacted}:636")
    

    This has been known to work when the other will not.

    0 讨论(0)
提交回复
热议问题