|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-01-14 18:24 UTC] ryanphp at ryanjameson dot com
Below is a sample of the problem. First is a string of the function call and then the result. Results are not coming back for the extension that came with 4.3.0. ///////// USING EXTENSION FROM 4.2.3 THE QUERY WAS: ldap_search(samecon,'cn=users, dc=IBS, dc=org','name=Susan Lincoln'); the result was :[1] THE QUERY WAS: ldap_search(samecon,'cn=users, dc=IBS, dc=org','name=Bob Johnson'); the result was :[1] THE QUERY WAS: ldap_search(samecon,'cn=users, dc=IBS, dc=org','name=Stephen Hyde'); the result was :[1] THE QUERY WAS: ldap_search(samecon,'cn=users, dc=IBS, dc=org','name=Cory Hymn'); the result was :[1] THE QUERY WAS: ldap_search(samecon,'cn=users, dc=IBS, dc=org','name=Stan Kanner'); the result was :[1] ///////// USING EXTENSION FROM 4.3.0 THE QUERY WAS: ldap_search(samecon,'cn=users, dc=IBS, dc=org','name=Susan Lincoln'); the result was :[] THE QUERY WAS: ldap_search(samecon,'cn=users, dc=IBS, dc=org','name=Bob Johnson'); the result was : [] THE QUERY WAS: ldap_search(samecon,'cn=users, dc=IBS, dc=org','name=Stephen Hyde'); the result was :[] THE QUERY WAS: ldap_search(samecon,'cn=users, dc=IBS, dc=org','name=Cory Hymn'); the result was :[] THE QUERY WAS: ldap_search(samecon,'cn=users, dc=IBS, dc=org','name=Stan Kanner'); the result was :[] PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 14:00:02 2025 UTC |
Ok, I give up. After I actually found one of those servers that worked I couldn't find a single valid attribute to search on. I tried cn, name, ... and other common attribute types. All returned invalid attribute type. So here's a simpler sample of the problem: <?PHP $ds=ldap_connect("censored"); $dn = "cn=censored, ou=censored, dc=ibs, dc=org"; $password = "censored"; $dir = "cn=users, dc=IBS, dc=org"; $criteria = "'name=Ryan Jameson (USA)'"; if ($ds) { $r=ldap_bind($ds,$dn,$password); $sr=ldap_search($ds,$dir, $criteria); $info = ldap_get_entries($ds, $sr); echo count($info) . " records returned."; } ldap_close($ds); ?> PHP 4.2.3 extension returns: 1 records returned. PHP 4.3.0 extension returns: Warning: ldap_search(): Search: Bad search filter in R:\WebApps\api\ldapSearcherTest.php on line 9 Warning: ldap_get_entries(): supplied argument is not a valid ldap result resource in R:\WebApps\api\ldapSearcherTest.php on line 10 0 records returned.Ok, I'll close this. Basically the functionality has been changed a bit, it seems that the new version of php_ldap.dll now requires escape characters on special characters including '(' & ')' ... the old version for win32 did not. It appears that this has been the case on the unix based versions for some time now.