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

后端 未结 7 1222
温柔的废话
温柔的废话 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:03

    1. In debian based systems:

      Install the package: ldap-utils and in the file /etc/ldap/ldap.conf, edit the line:

      TLS_CACERT /etc/ldap/cacerts/cacert.asc
      

      Create the directory /etc/ldap/cacerts and copy the cacert to /etc/ldap/cacerts/cacert.asc

      Restart apache.

    2. In redhat based systems:

      Install the package: openldap-clients and in the file /etc/openldap/ldap.conf edit the line:

      TLS_CACERT /etc/openldap/cacerts/cacert.asc
      

      Create the directory /etc/openldap/cacerts and copy the cacert to /etc/openldap/cacerts/cacert.asc

      Restart httpd

提交回复
热议问题