php ldap ssl novell

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nota141
Forum Newbie
Posts: 8
Joined: Wed Dec 10, 2003 11:57 pm

php ldap ssl novell

Post 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.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

If it's secure, try making an LDAPS connection instead of an LDAP connection.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
nota141
Forum Newbie
Posts: 8
Joined: Wed Dec 10, 2003 11:57 pm

Post by nota141 »

I have just tryed that and it still does not work.

thanks
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

What's not working? The connection just can't be made? Are you getting results back at all?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
nota141
Forum Newbie
Posts: 8
Joined: Wed Dec 10, 2003 11:57 pm

Post 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
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply