I have a php application (apache,redhat with selinux disabled) and I am struggling with ldap configuration. I am trying to connect to a ldap server and I am getting this error in apache logs:
ldap_bind(): Unable to bind to server: Can't contact LDAP server
when running ldapsearch command : I also get this error:
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
I tried to debug and used openssl command : openssl s_client -connect xx.com:636 -debug and get this :
CONNECTED(00000003)
write:errno=0
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 322 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 322 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
Has someone had the same issue? I thought it could be the firewall but I opened port 636 so I don't think that is the problem. The /etc/openldap/ldap.conf is also configured and the certificate is mentionned in the file and does exist with the correct rights so I am not sure it would be the certificate either..I am a bit lost. Any help is appreciated. Thanks