[Date Prev][Date Next] [Chronological] [Thread] [Top]

bind problem



After some assistance from a couple of people on the list (thanks) I have
an install on OpenLDAP 2.1.3 on an AIX 4.3.3 system.  My problem is that a
simple test php script refuses to bind.  I'm a novice at ldap, however I'm
fairly sure the syntax is good as i've tested it on another server with
correct results.  The script is as follows...

<?php
// basic sequence with LDAP is connect, bind, search, interpret search
// result, close connection

echo "<h3>LDAP query test</h3>";
echo "Connecting ...";
$ds=ldap_connect("my.ldap.server", 10389);  // must be a valid LDAP
server!
echo "connect result is ".$ds."<p>";

if ($ds) {
    echo "Binding ...";
    $r=ldap_bind($ds,"cn=##########","###########");
    echo "Bind result is ".$r."<p>";

    echo "Closing connection";
    ldap_close($ds);

} else {
    echo "<h4>Unable to connect to LDAP server</h4>";
}
?>

The script returns the following...

    LDAP query test

    Connecting ...connect result is Resource id #1

    Binding ...
    Warning: LDAP: Unable to bind to server: Can't contact LDAP server in
    /web/lookup/testldap2.php on line 12
    Bind result is

    Closing connection



If anyone has any ideas I would really appreciate it.

thanks,

patrick