Jump to content

LDAPs on windows IIS - certificate install?


phroobar

Recommended Posts

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.