php_bind() question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
If my Base DN is dc=abcd,dc=com,dc=tw
User DN is uid=root, ou=People
then what's the $ldapRDN should be in ldap_bind($conn, $ldapRDN,

my test code is as following:

$ldaprdn="uid=root, ou=People, dc=abcd, dc=com, dc=tw";
     echo "connect to ".$ldapServer." successfully <br>";
   echo "can't connect to LDAP server!<br>";
if ($ldapconn) {

   // binding to ldap server
   //$ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass);
   $ldapbind = ldap_bind($ldapconn);
   // verify binding
   if ($ldapbind) {
       echo "LDAP bind successful...";
   } else {
       echo "LDAP bind failed...";

I execute in command line c:\>php LDAP.test1.php,then a warning

Warning: ldap_bind(): Unable to bind to server: Protocol error in
\LDAP_test1.php on line 17

the 17th line is  ldap_bind($conn);
Protocol error means communication protocol error&#65311;what should I
do to correct this warning?


Re: php_bind() question

Not sure if these links will help but it can't hurt aye?! +Unable+to+bind+to+server&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-GB:official

Site Timeline