From: Geert P. <Gee...@in...> - 2001-02-11 21:40:25
|
Hi, I just downloaded and installed from CPAN Bundle::Net::LDAP (so I should have the latest version). I do have trouble however performing even the simplest function. Whatever LDAP function I call, the library returns a protocol error. Yet, I use the most simple program I can think of : ---- #/usr/bin/perl -w use Net::LDAP; my $server= 'localhost'; my $ldap = Net::LDAP->new($server, debug => 15) or die "$@" ; $ldap->bind (); $ldap->unbind; # take down session ---- What I get is (text continued below...): ---- Net::LDAP=HASH(0x804c048) sending: 30 0C 02 01 01 40 07 02 01 02 04 00 80 00 __ __ 0....@........ 0000 30 12: SEQUENCE { 0002 02 1: INTEGER = 1 0005 40 7: [APPLICATION 0] 0007 : 02 01 02 04 00 80 00 __ __ __ __ __ __ __ __ __ ....... 000E : } Net::LDAP=HASH(0x804c048) received: 30 38 02 01 00 78 33 0A 01 02 04 00 04 14 75 6E 08...x3.......un 6B 6E 6F 77 6E 20 4C 44 41 50 20 72 65 71 75 65 known LDAP reque 73 74 8A 16 31 2E 33 2E 36 2E 31 2E 34 2E 31 2E st..1.3.6.1.4.1. 31 34 36 36 2E 32 30 30 33 36 __ __ __ __ __ __ 1466.20036 0000 30 56: SEQUENCE { 0002 02 1: INTEGER = 0 0005 78 51: [APPLICATION 24] { 0007 0A 1: ENUM = 2 000A 04 0: STRING = '' 000C 04 20: STRING = 'unknown LDAP request' 0022 8A 22: [CONTEXT 10] 0024 : 31 2E 33 2E 36 2E 31 2E 34 2E 31 2E 31 34 36 36 1.3.6.1.4.1.1466 0034 : 2E 32 30 30 33 36 __ __ __ __ __ __ __ __ __ __ .20036 003A : } 003A : } Net::LDAP=HASH(0x804c048) sending: 30 05 02 01 02 42 00 __ __ __ __ __ __ __ __ __ 0....B. 0000 30 5: SEQUENCE { 0002 02 1: INTEGER = 2 0005 42 0: [APPLICATION 2] 0007 : } ---- The really weird part is that when I use perl debug mode everything does work : ---- Net::LDAP=HASH(0x8586204) sending: 30 0C 02 01 01 60 07 02 01 02 04 00 80 00 __ __ 0....`........ 0000 30 12: SEQUENCE { 0002 02 1: INTEGER = 1 0005 60 7: [APPLICATION 0] { 0007 02 1: INTEGER = 2 000A 04 0: STRING = '' 000C 80 0: [CONTEXT 0] 000E : } 000E : } Net::LDAP=HASH(0x8586204) received: 30 0C 02 01 01 61 07 0A 01 00 04 00 04 00 __ __ 0....a........ 0000 30 12: SEQUENCE { 0002 02 1: INTEGER = 1 0005 61 7: [APPLICATION 1] { 0007 0A 1: ENUM = 0 000A 04 0: STRING = '' 000C 04 0: STRING = '' 000E : } 000E : } Net::LDAP=HASH(0x8586204) sending: 30 05 02 01 02 42 00 __ __ __ __ __ __ __ __ __ 0....B. 0000 30 5: SEQUENCE { 0002 02 1: INTEGER = 2 0005 42 0: [APPLICATION 2] 0007 : } ---- Does anyone have an explanation for this? The debug output suggests that the message was not encoded correctly. I dug into the source, but the encoding code is a little too heavy for the uninitiated... I don't think that it matters, but I'm using openLDAP 2.0.7, which is responding as it is supposed to using the C library. Thanks for reading through this (not too?) long post, Geert |