ID: 4378 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -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] [EMAIL PROTECTED] 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
