Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.2.0

Bug #16278 Problem in starttls function
Submitted: 2009-06-02 17:54 UTC
From: psaid Assigned: beni
Status: Closed Package: Net_LDAP2 (version 2.0.0)
PHP Version: 5.1.6 OS: Centos 5.3
Roadmaps: 2.1.0    
Subscription  


 [2009-06-02 17:54 UTC] psaid (Paulo Dias)
Description: ------------ I have this error: PHP Fatal error: Call to undefined method Net_LDAP2_Error::getValue() in /usr/share/pear/Net/LDAP2.php on line 576 Probably i'm doing something wrong or missing some config. Thanks in advance Paulo

Comments

 [2009-06-02 18:47 UTC] beni (Benedikt Hallinger)
-Assigned To: +Assigned To: beni -Roadmap Versions: +Roadmap Versions: 2.1.0
 [2009-06-02 18:55 UTC] beni (Benedikt Hallinger)
Hello, thanks for reporting this bug. Which LDAP server do you use? At connecting time, Net_LDAP2 checks via the rootDSE entry of your server if it supports TLS, when you would like to have TLS enabled. This check fails, the startTLS() method gets an error. Most probably this is the result in Net_LDAP2 not allowed to read the rootDSE entry which is most likely a configuration issue of your server. To verify that, please adjust the code of startTLS() in LDAP2.php: ------------snip-------------- public function startTLS() { // Test to see if the server supports TLS first. // This is done via testing the extensions offered by the server. // The OID 1.3.6.1.4.1.1466.20037 tells us, if TLS is supported. $rootDSE = $this->rootDse(); if (self::isError($rootDSE)) { return $this->raiseError("Unable to fetch rootDSE entry ". "to see if TLS is supoported: ".$rootDSE->getMessage(), $rootDSE->getCode()); } $supported_extensions = $rootDSE->getValue('supportedExtension'); if (self::isError($supported_extensions)) { return $this->raiseError("Unable to fetch rootDSE attribute 'supportedExtension' ". "to see if TLS is supoported: ".$supported_extensions->getMessage(), $supported_extensions->getCode()); } if (in_array('1.3.6.1.4.1.1466.20037', $supported_extensions)) { ----------snap----------- This way, an better error message will be passed back which you can get from Net_LDAP2s connect() method. Please report back the error given.
 [2009-06-02 18:58 UTC] beni (Benedikt Hallinger)
The following patch has been added/updated: Patch Name: LDAP2.php.1.21-patch Revision: 1243951137 URL: http://pear.php.net/bugs/patch-display.php?bug=16278&patch=LDAP2.php.1.21-patch&revision=1243951137&display=1
 [2009-06-02 18:59 UTC] beni (Benedikt Hallinger)
I added a patch file patching the LDAP2.php from 2.0.0 release to the latest CVS. Please use that patch to avoid cut-n-paste errors from the bug report.
 [2009-06-02 20:34 UTC] psaid (Paulo Dias)
With the patch. This error. BIND FAILED: Unable to fetch rootDSE entry to see if TLS is supoported: LDAP_CONFIDENTIALITY_REQUIRED Parameters: Base: Filter: (objectClass=*) Scope: base: LDAP_CONFIDENTIALITY_REQUIRED: LDAP_CONFIDENTIALITY_REQUIRED It can't bind my server... becose TLS is not started. Any ideas to resolv this. Thanks in advance Paulo
 [2009-06-03 00:42 UTC] beni (Benedikt Hallinger)
Thank you for trying the patch! I now think the bind is the problem; please try the instructions from bug report #16272 which had a similar problem (but looked different, thus the other problem solving instructions). Yesterday similar problems where fixed in CVS. Lets try if this also solves your issue.
 [2009-06-03 00:43 UTC] beni (Benedikt Hallinger)
Link to the bug #16272
 [2009-06-03 18:54 UTC] beni (Benedikt Hallinger)
Yesterday, code was introduced to CVS which may solve your issue. Please also test with the latest version of LDAP2.php from CVS (see pear website cvs browser)
 [2009-06-10 16:51 UTC] beni (Benedikt Hallinger)
Hello, did it helped? I will close the bug since i am confident that your issue is solved already in CVS. Please report if that is not the case.
 [2009-06-15 13:05 UTC] beni (Benedikt Hallinger)
-Status: Assigned +Status: Closed
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.