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

Bug #14886 Connection fails on OpenLdap v3
Submitted: 2008-10-26 14:23 UTC
From: joaofco Assigned: beni
Status: Closed Package: Net_LDAP2 (version 2.0.0RC4)
PHP Version: 5.2.0 OS: Debian Linux 2.6.18-4-686
Roadmaps: 2.0.0    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 46 + 17 = ?

 
 [2008-10-26 14:23 UTC] joaofco (Joao Oliveira)
Description: ------------ If the OpenLdap server is configured to accepts only version 3 the connection fails with the message "LDAP Server does not support protocol version 3" Additionaly a Warning is raised: Warning: in_array() [function.in-array]: Wrong datatype for second argument in /usr/share/php/Net/LDAP2.php on line 1169 Fix: Add lines if (!is_array($supported_versions)) $supported_versions = array($supported_versions); after line 1168 Test script: --------------- #using a openldap server that accepts only protocol v3 require_once 'Net/LDAP2.php'; $config = array ( 'binddn' => 'cn=admin, dc=example, dc=com', 'bindpw' => 'password', 'basedn' => 'ou=users,dc=example, dc=com', 'host' => 'localhost' ); $ldap = Net_LDAP2::connect($config); if (PEAR::isError($ldap)) print ('Could not connect to LDAP-server: '.$ldap->getMessage()); else echo 'Conected!'; Expected result: ---------------- Conected! Actual result: -------------- LDAP Server does not support protocol version 3

Comments

 [2008-10-28 06:41 UTC] beni (Benedikt Hallinger)
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.