Bug #4378: ldap_seach function does not give you an option to use either LDAP V2 or V3

From: Date: Wed, 10 May 2000 17:21:24 +0000
Subject: Bug #4378: ldap_seach function does not give you an option to use either LDAP V2 or V3
Groups: php.dev 
Request: Send a blank email to php-dev+get-18575@lists.php.net to get a copy of this message
From: nbrandon@hotmail.com Operating system: Windows NT 4.0 PHP version: 3.0.16 PHP Bug Type: LDAP related Bug description: ldap_seach function does not give you an option to use either LDAP V2 or V3 I have got LDAP successfully working on Windows NT 4.0. When using the function ldap_search, it works fine for a filter like 'sn=brandon*'. However, we use attributes with an underscore. When I specify a filter with an underscore liek 'corp_unique_key=4485*'. I get the following error message when loading the page; Warning: LDAP: Unable to perform the search: Bad search filter in c:\program files\apache group\apache\htdocs\ldap\test2.php3 on line 20 The line of code is: $sr = ldap_search($ds, $base_dn, "corp_unique_key=4485*"); I have been told that this could be a problem because the underscore is an illegal character in V3. However in V2, its perfectly legal to use. I believe you can specify to use either version using the C libraries. (I got an email from someone to explain how the difference should look) ldapsearch -h x5mer1 -V2 -bo=company corp_unique_key=123456 ldapsearch -h x5mer1 -V3 -bo=company corpuniquekey=123456 So, the question (or bug): How do you specify which version of the protocol you wish to use in the ldap_search funtion?

« previous php.dev (#18575) next »