Page 1 of 1

php ldap ssl novell

Posted: Tue Jan 27, 2004 11:30 pm
by nota141
i have a novell sever which i have been auththincating with ldap fine untill the nw admin decided he would secure it and now i cant get it to work what do i need to do to get it to work. i am running apache 2 on windows and on redhat both with php 4.3.4 and i am trying to connect to a novell 6.1 server(that all i know about the novell server)

thanks for any assantance.

Posted: Wed Jan 28, 2004 4:01 pm
by pickle
If it's secure, try making an LDAPS connection instead of an LDAP connection.

Posted: Wed Jan 28, 2004 4:17 pm
by nota141
I have just tryed that and it still does not work.

thanks

Posted: Wed Jan 28, 2004 4:39 pm
by pickle
What's not working? The connection just can't be made? Are you getting results back at all?

Posted: Wed Jan 28, 2004 5:13 pm
by nota141
here is the code i am using

Code: Select all

<?php

$ldaphost = "ldaps://10.60.8.48"; // have tryed "ldaps://curric.aphs.sa.edu.au" and with out the ldaps://
$ldapport = 636;

$ldapUsername  = "********";
$ldapPassword = "******";

echo $ldaphost;
$ds = ldap_connect($ldaphost, $ldapport);
    if(!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)){
        print "Could not set LDAPv3";
    }
    else {
        // now we need to bind to the ldap server
        $bth = ldap_bind($ds, $ldapUsername, $ldapPassword);
        //make your query
    }


?>
and the error i get is
Warning: ldap_bind(): Unable to bind to server: Can't contact LDAP server in C:\website\techsupportmark2\temp.php on line 15

Posted: Wed Jan 28, 2004 5:23 pm
by pickle
I'm not too knowledgeable in this area, but I do know that in my setups, the ldap host needs to have a trailing slash. The host address does need to be an IP though.