php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60614 Rebinding always results in false return from bind()
Submitted: 2011-12-28 04:42 UTC Modified: 2013-09-30 09:54 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: david dot kit at cookmedical dot com Assigned:
Status: Not a bug Package: LDAP related
PHP Version: 5.3.8 OS: Windows XP Pro SP3
Private report: No CVE-ID: None
 [2011-12-28 04:42 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-30 09:54 UTC] mike@php.net
-Status: Open +Status: Not a bug
 [2013-09-30 09:54 UTC] mike@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 00:01:31 2024 UTC