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

Bug #14886 Connection fails on OpenLdap v3
Submitted: 2008-10-26 10:23 UTC Modified: 2008-10-28 02:41 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  


 [2008-10-26 10: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 02: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.