phroobar Posted March 11 Share Posted March 11 I have an application that uses LDAP to authenticate with my company's AD servers under IIS windows servers. They now want us to use LDAP secured. They have given me the ldaps site and company certificates. However, when I try to use it, I get Can't contact LDAP server. I think it is because PHP can't recognize the certificates. I did install them by right clicking on them and pressing install, but I don't think that flies for PHP. How do I get these certificated installed so PHP will recognize them? <?php $ds = ldap_connect('ldaps://xxx.xxcom:636'); ldap_bind($ds, 'CN=xxx,OU=APPIDS,DC=us,DC=bank-dns,DC=com', 'xxx') or die('ERROR'); echo 'SUCCESS'; Warning: ldap_bind(): Unable to bind to server: Can't contact LDAP server in C:\PHP81\ldaptest.php on line 3 ERROR 2024-03-05 15:48 CST LDAP ldap_api.php:373 ldap_authenticate_by_username() Binding to LDAP server 2024-03-05 15:48 CST LDAP ldap_api.php:67 ldap_connect_bind() Checking syntax of LDAP server URI 'ldaps://xxx.xx.com:636'. 2024-03-05 15:48 CST LDAP ldap_api.php:76 ldap_connect_bind() LDAP server URI syntax check succeeded 2024-03-05 15:48 CST LDAP ldap_api.php:89 ldap_connect_bind() Setting LDAP protocol version to 3 2024-03-05 15:48 CST LDAP ldap_api.php:142 ldap_connect_bind() Attempting bind to ldap server as 'CN=xxx,OU=APPIDS,DC=us,DC=bank-dns,DC=com' 2024-03-05 15:48 CST LDAP ldap_api.php:50 ldap_log_error() ERROR #-1: Can't contact LDAP server 2024-03-05 15:48 CST LDAP ldap_api.php:152 ldap_connect_bind() Bind to ldap server failed Quote Link to comment Share on other sites More sharing options...
Barand Posted March 11 Share Posted March 11 Before I retired (approx 12 years ago) I regularly worked on a windows based intranet. I found the ADLDAP class a great tool. In fact the system admins used to ask me to create reports that they couldn't accesss via their Microsoft network tools. https://github.com/adldap/adLDAP 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.