Help needed:: Openldap issue - - LDAP_OPERATIONS_ERROR Server encountered

Discussion in 'Perl Misc' started by Durairaj Avasi, Apr 6, 2004.

  1. 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
     
    Durairaj Avasi, Apr 6, 2004
    #1
    1. Advertising

  2. Durairaj Avasi

    Vetle Roeim Guest

    Re: Help needed:: Openldap issue - - LDAP_OPERATIONS_ERROR Serverencountered

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


    [...]
    --
    #!/usr/bin/vr
     
    Vetle Roeim, Apr 6, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Durairaj Avasi
    Replies:
    1
    Views:
    1,029
    Slackware
    Apr 7, 2004
  2. steve

    OpenLDAP & java

    steve, Jun 12, 2004, in forum: Java
    Replies:
    3
    Views:
    5,905
    bart6425
    Jun 28, 2009
  3. Eric Gutierrez
    Replies:
    2
    Views:
    8,973
    Anzime
    Dec 10, 2004
  4. Gert Albertse

    OpenLDAP

    Gert Albertse, Apr 2, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    531
    =?Utf-8?B?U2FzaGlkaGFyIEtva2t1?=
    Apr 2, 2007
  5. Durairaj Avasi
    Replies:
    1
    Views:
    118
    Durairaj Avasi
    Apr 7, 2004
Loading...

Share This Page