How do I solve ldap_start_tls() “Unable to start TLS: Connect error” in PHP?

后端 未结 7 1235
温柔的废话
温柔的废话 2020-12-14 03:59

I\'m getting:

Warning: ldap_start_tls() [function.ldap-start-tls]: Unable to start TLS: Connect error in /var/www/X.php on line Y

7条回答
  •  悲&欢浪女
    2020-12-14 04:10

    Some additional help for others, the certificate solution here solved my ldapsearch command line issue, but still PHP complained **Can't contact LDAP server**

    Turned out to be SELinux on RHEL7 ( CentOS7 ) blocks HTTPD from using LDAP ports 389 and 636 by default, you can unblock with:

    setsebool -P httpd_can_network_connect 1
    

    Check your SELinux audit log file for things being blocked.

提交回复
热议问题