#4378 [Opn->Csd]: ldap_seach function does not give you an option to use either LDAP V2 or V3
| From: | hholzgra@php.net | Date: | Tue, 01 Oct 2002 20:46:15 +0000 |
| Subject: | #4378 [Opn->Csd]: ldap_seach function does not give you an option to use either LDAP V2 or V3 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-21155@lists.php.net to get a copy of this message | ||
ID: 4378
Updated by: hholzgra@php.net
Reported By: nbrandon@hotmail.com
-Status: Open
+Status: Closed
Bug Type: LDAP related
Operating System: Windows NT 4.0
PHP Version: 3.0.16
New Comment:
from http://php.net/ldap_set_option
// $ds is a valid link identifier for a directory server
if (ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3))
echo "Using LDAPv3";
else
echo "Failed to set protocol version to 3";
Previous Comments:
------------------------------------------------------------------------
[2000-05-10 13:21:24] nbrandon@hotmail.com
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?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=4378&edit=1