using centos 7 to connect to remote openldap server vi LAM

selinux is in permissive mode

LAM host connects fine from command line using ldapwhoami and other ldap 
cli tools... ldap client config definitely ok on host, but php fails...


lam reports:

LDAP error, server says: (-1) Can't contact LDAP server

have followed all advise on this list about creating both:

/etc/ldap.conf as well as /etc/openldap/ldap.conf

specifying:
TLS_REQCERT never

pointing to certfile, certdir, etc., etc... .

a simple php test script (see below) returns:

PHP Warning:  ldap_start_tls(): Unable to start TLS: Can't contact LDAP 
server

this seems to be a more general php/ldaps issue rather than something 
specific to LAM... but any leads would be appreciated


--snip---

<?php

ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);

    $ldap="ldaps://SECRETHOSTNAME";
    $usr="uid=SECRETUSER,ou=people,dc=mydomain,dc=com";
    $pwd="SECRETPASS";

    $ds=ldap_connect($ldap);
    $ldapbind=false;
    if(ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3))
       if(ldap_set_option($ds, LDAP_OPT_REFERRALS, 0))
          if(ldap_start_tls($ds))
                $ldapbind = @ldap_bind($ds, $usr, $pwd);
    ldap_close($ds);

    if(!$ldapbind)
       echo "ERROR";
    else
       echo "OK";
?>






-- 
Jeoffrey Pooser
Chief Security Officer
Clickshare Service Corporation
(413)-200-0904


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Lam-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lam-public

Reply via email to