From: Woanning <Wn...@va...> - 2002-09-16 02:15:35
|
Hi Graham, Thanks for your reply. I really appreciate that. The msg I send previously is all the output I got. my code is a simply script as below : ================================================== #!d:\perl\bin\perl -w use Net::LDAP; use Net::LDAP::Util qw( ldap_error_name ldap_error_text) ; print "Content-type:text/html\n\n"; my ($ldap) = Net::LDAP->new('10.1.1.112',port=> 8404, debug => 3) or die "Can't bind to ldap: $!\n"; $mesg = $ldap->bind( version => 3, dn => 'cn=Directory Manager,o=cisco.com', password => 'passabc'); my ($mesg) = $ldap->search( base => "ou=Users,o=cisco.com", filter =>'(cn=oliver)', attrs => [ "*" ]); $mesg->code && die "Code: ".$mesg->code." Error: ".ldap_error_name($mesg->code).":".ldap_error_text($mesg->code)." "; ############### the program will stop progress from here print "helo"; foreach $entry ($mesg->all_entries){ $password = $entry->get('userPassword'); print "password : $password\n"; } $ldap->unbind; exit; ================================================== I've tried to trace back the code and the LDAP.pm file, I found out that the program is stop at the point where when the LDAP.pm called the "asn_read($sock, $pdu)" function. and if I change the line of my code from: $mesg->code && die "Code: ".$mesg->code." Error: ".ldap_error_name($mesg->code).":".ldap_error_text($mesg->code)." "; to: $mesg->code && die $mesg->error; then I'll get this error message : I/O Error and I found out that the error message is generated from the asn_read function in the IO.pm file in the ASN1 module. Do you have any idea why I'm getting this? Is it because I run on the Windows 2000? does the ASN1 library compatible with the OS? Does anybody successfully run it before on Windows 2000? Thanks. appreciate much. _____________________ Woan Ning Vads Berhad * +603 - 7712 8331 (D/L) * wn...@va... @}--\--- -----Original Message----- From: Graham Barr [mailto:gb...@po...] Sent: Friday, September 13, 2002 10:33 PM To: Woanning Cc: per...@li... Subject: Re: LDAP_OPERATIONS_ERROR :Server encountered an > internal error Is this all the output you got ? I dont see any trace of received packets. What does you script look like and how far did it get before you get this error ? Graham. On Fri, Sep 13, 2002 at 11:54:46AM +0800, Woanning wrote: > Hi, > Can anybody show me some lights here as I've work out this bugs for so long > and still cant' able to find the solution for it... > Thanks. > I'm using active perl in Windows 2000 to connect ot a LDAP server... > I'm getting this error message: > Return code: 1 Message: LDAP_OPERATIONS_ERROR :Server encountered an > > internal error > and after I turn on the 'debug => 3' in my code as below: > $ldap = Net::LDAP->new('10.1.1.112',port=>8404, debug => 3) or die "$@"; > I got the below debugs text: > Net::LDAP=HASH(0x8a7f174) sending: > 30 33 02 01 01 40 2E 02 01 03 04 20 63 6E 3D 44 03...@..... cn=D > 69 72 65 63 74 6F 72 79 20 4D 61 6E 61 67 65 72 irectory Manager > 2C 6F 3D 63 69 73 63 6F 2E 63 6F 6D 80 07 70 61 ,o=cisco.com..pa > 73 73 61 62 63 __ __ __ __ __ __ __ __ __ __ __ ssabc > Net::LDAP=HASH(0x8a7f174) sending: > 30 3D 02 01 02 43 38 04 14 6F 75 3D 55 73 65 72 0=...C8..ou=User > 73 2C 6F 3D 63 69 73 63 6F 2E 63 6F 6D 0A 01 02 s,o=cisco.com... > 0A 01 02 02 01 00 02 01 00 01 01 00 83 0C 04 02 ................ > 63 6E 04 06 6F 6C 69 76 65 72 30 03 04 01 2A __ cn..oliver0...* > Code: 1 Error: LDAP_OPERATIONS_ERROR:Server encountered an internal error > at test.cgi line 23. > > Net::LDAP version I'm using is : $VERSION = 0.25; > ASN1 version I'm using is : $VERSION = '0.16'; > but there's a commented code in the ASN1.pm read : > # $Id: ASN1.pm,v 1.23 2002/08/20 00:00:57 gbarr Exp $ > (so I"m not sure which version is ASN1 is correct.. either is 0.16 or 1.23?) > > Thank you very much if anybody can provide me any help on this..... > > > > _____________________ > Woan Ning > Vads Berhad > * +603 - 7712 8331 (D/L) > * wn...@va... > > @}--\--- > > ~Where there is pain, I wish you peace and mercy.~ > ~Where there is self-doubting, I wish you a renewed confidence in your > ability to work through it.~ > ~Where there is tiredness, or exhaustion, I wish you understanding, > patience, and renewed strength.~ > ~Where there is fear, I wish you love, and courage.~ > > |