From: Chris R. <chr...@me...> - 2002-08-14 07:39:03
|
On 13/8/02 7:08 pm, Vanole, Mike <mik...@at...> wrote: > Thanks for the path to go down. > > My ldap admin says the fields are not text so wildcards won't work. He Correct. The syntax of your attributes seems to be GeneralizedTime; attributes using this syntax typically only allow equality match (=) and ordering matches (>= and <=). No substring matching rules are usually defined (though you could check your server) and hence no "wildcards" are allowed in searches. > suggested trying this without the equals symbol, but it also failed (a bit > differently): > $filter = "(&(whenCreated > 20020812000000.0Z) (whenCreated < > 20020812235959.0Z))"; > > Bad filter at get_ldap.pl line 63. > > This also fails with "Bad filter": > my $filter = "(whencreated > 20020812000000.0Z)"; Also correct; LDAP filters support <= and >=, not < and >. See RFC 2254. > I can do this but I still don't achieve my objective of getting under the > server imposed sizelimit: > > $whenCreated = $entry->get_value( whenCreated, asref => 0 ); > > if ($whenCreated =~ /^20020812/) { > ..do something perlish... > > Working with Net::LDAP and seeking advice from my ColdFusion counterparts I > am finding they are only a little helpful because the differences in options > available between ADO, VB, and ColdFusion (basically NT) and Net::LDAP are > many. For instance I am bumping into a server imposed sizelimit with > Net::LDAP that the NT guys don't have. And apparently they don't have the > filter issues I'm having. Is there a *differences* document that anyone can > point me to? I'm die-hard-perl-on-UNIX so moving to NT is not an option. There's no reason you couldn't use the same sort of filter that they're using. Do the server logs contain their search filters? If not, consider snooping the LDAP network traffic between ColdFusion and the directory. Programs like Ethereal <http://www.ethereal.com/> will do this and decode lots of protocols (including LDAP :-) automatically. Cheers, Chris |