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
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