From: Graham B. <gb...@po...> - 2002-08-14 23:33:29
|
What versions of Net::LDAP and Net::LDAP::Filter do you have ? Whitespace should not matter Graham. On Wed, Aug 14, 2002 at 06:23:55PM -0500, Vanole, Mike wrote: > Thank you for your input Chris. > > I did look at the RFC first but it couldn't help me with this. The problem > was so simple I can't believe there was even a problem. > > This filter fails: > $filter = "(&(whenCreated >= 20020812000000.0Z) (whenCreated <= > 20020812235959.0Z))"; > > and this filter succeeds: > $filter = "(&(whenCreated>=20020812000000.0Z) > (whenCreated<=20020812235959.0Z))"; > > The only difference is the space character before and after the ordering > matches. I don't know if this is by design or specific to my environment, > but if it is a requirement maybe the next release of Net::LDAP could strip > this stuff out where required. > > Thanks again! > > -----Original Message----- > From: Chris Ridd [mailto:chr...@me...] > Sent: Wednesday, August 14, 2002 02:38 > To: Vanole, Mike; 'per...@li...' > Subject: Re: Net::LDAP Filter question > > > 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 > > > ------------------------------------------------------- > This sf.net email is sponsored by: Dice - The leading online job board > for high-tech professionals. Search and apply for tech jobs today! > http://seeker.dice.com/seeker.epl?rel_code=31 |