Edit report at https://bugs.php.net/bug.php?id=60614&edit=1
ID: 60614 Updated by: m...@php.net Reported by: david dot kit at cookmedical dot com Summary: Rebinding always results in false return from bind() -Status: Open +Status: Not a bug Type: Bug Package: LDAP related Operating System: Windows XP Pro SP3 PHP Version: 5.3.8 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php ldap_unbind/ldap_close are jsut aliases. Previous Comments: ------------------------------------------------------------------------ [2011-12-28 04:42:59] david dot kit at cookmedical dot com Description: ------------ --- >From manual page: http://www.php.net/function.ldap-bind#refsect1-function.ldap- bind-description --- I reproduced a problem where connecting to an LDAP server, and then binding to an address I know to exist and work will perform perfectly. Within the same script, following an unbind (as I don't need the connection to be binded any more), using ldap_bind(..) again [even the same user and password as the original] would result in a fail. Test script: --------------- // Assume variables all set in working order below... $ldapconn = ldap_connect($ldaphost, $ldapport) or die("Could Not Connect to $ldaphost"); $ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass); // bind successful ldap_unbind($ldapconn); $ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass); // second bind unsuccessful!? ldap_close($ldapconn); // close ldap connection Expected result: ---------------- after unbind, the bind function will work normally Actual result: -------------- after unbind, bind function always fails. if initial bind has not been unbinded, then subsequent bind (even for same/different user) will work correctly. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60614&edit=1