Help needed:: Openldap issue - - LDAP_OPERATIONS_ERROR Server encountered

D

Durairaj Avasi

Hello all:::

Need your hand on this...

#!/usr/bin/perl -w
use Net::LDAP;
use Net::LDAP::Util qw(ldap_error_name ldap_error_text);
my $ldap = Net::LDAP->new('xy.webdurai.net', port=> 389) or die "$@";

my @args = (
base => 'DC=xy',
scope => "subtree",
filter =>
'(&(objectClass=user)(objectCategory=Person))',
attrs => ["distinguishedName", "Home-MDB",
"postalAddress", "l","st", "postalcode"]
);
my $mesg = $ldap->search( @args );
if ($mesg->code) {
print "ERROR detected: -> ", ldap_error_name($mesg->code), " ",
ldap_error_text($mesg->code);
warn "ERROR - not LDAP_SUCCESS";
#last;
}
my $total = $mesg->count;
print " the total is $total";

OUTPUT IS:
==========
ERROR detected: -> LDAP_OPERATIONS_ERROR Server encountered
ERROR - not LDAP_SUCCESS at u.pl line 15, <DATA> line 424.

NOTE::
=======

why i am getting LDAP_OPERATIONS_ERROR?

i am running under activeperl/perl-ldap/windows 2000

this is just simple search... do i have to bind it?

i thought i don't need to bind for search!!

thanks in advance.

Durairaj K. Avasi
 
V

Vetle Roeim

* Durairaj Avasi
[...]
this is just simple search... do i have to bind it?

i thought i don't need to bind for search!!

Try binding. You can do an anonymous bind by calling bind w/o any
parameters.


[...]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,048
Members
48,769
Latest member
Clifft

Latest Threads

Top