From: David A. P. <dpi...@un...> - 2001-06-06 19:50:46
|
Here is the output: Net::LDAP=HASH(0xc3064) sending: 30 81 B3 02 01 02 63 5D 04 18 6F 75 3D 50 65 6F 0.....c]..ou=Peo 70 6C 65 2C 6F 3D 75 6E 69 70 72 65 73 73 2E 63 ple,o=unipress.c 6F 6D 0A 01 02 0A 01 02 02 01 00 02 01 00 01 01 om.............. 00 A0 30 A1 17 A1 0F 87 02 73 6E 87 09 67 69 76 ..0......sn..giv 65 6E 6E 61 6D 65 87 04 6D 61 69 6C A3 15 04 0B enname..mail.... 6F 62 6A 65 63 74 63 6C 61 73 73 04 06 70 65 72 objectclass..per 73 6F 6E 30 00 A0 4F 30 2F 04 16 31 2E 32 2E 38 son0..O0/..1.2.8 34 30 2E 31 31 33 35 35 36 2E 31 2E 34 2E 34 37 40.113556.1.4.47 33 04 15 30 13 30 04 04 02 73 6E 30 0B 04 09 67 3..0.0...sn0...g 69 76 65 6E 6E 61 6D 65 30 1C 04 17 32 2E 31 36 ivenname0...2.16 2E 38 34 30 2E 31 2E 31 31 33 37 33 30 2E 33 2E .840.1.113730.3. 34 2E 39 01 01 FF __ __ __ __ __ __ __ __ __ __ 4.9... 0000 30 179: SEQUENCE { 0003 02 1: INTEGER = 2 0006 63 93: [APPLICATION 3] { 0008 04 24: STRING = 'ou=People,o=unipress.com' 0022 0A 1: ENUM = 2 0025 0A 1: ENUM = 2 0028 02 1: INTEGER = 0 002B 02 1: INTEGER = 0 002E 01 1: BOOLEAN = FALSE 0031 A0 48: [CONTEXT 0] { 0033 A1 23: [CONTEXT 1] { 0035 A1 15: [CONTEXT 1] { 0037 87 2: [CONTEXT 7] 0039 : 73 6E __ __ __ __ __ __ __ __ __ __ __ __ __ __ sn 003B 87 9: [CONTEXT 7] 003D : 67 69 76 65 6E 6E 61 6D 65 __ __ __ __ __ __ __ givenn ame 0046 : } 0046 87 4: [CONTEXT 7] 0048 : 6D 61 69 6C __ __ __ __ __ __ __ __ __ __ __ __ mail 004C : } 004C A3 21: [CONTEXT 3] { 004E 04 11: STRING = 'objectclass' 005B 04 6: STRING = 'person' 0063 : } 0063 : } 0063 30 0: SEQUENCE { 0065 : } 0065 : } 0065 A0 79: [CONTEXT 0] { 0067 30 47: SEQUENCE { 0069 04 22: STRING = '1.2.840.113556.1.4.473' 0081 04 21: STRING 0083 : 30 13 30 04 04 02 73 6E 30 0B 04 09 67 69 76 65 0.0...sn0. ..give 0093 : 6E 6E 61 6D 65 __ __ __ __ __ __ __ __ __ __ __ nname 0098 : } 0098 30 28: SEQUENCE { 009A 04 23: STRING = '2.16.840.1.113730.3.4.9' 00B3 01 1: BOOLEAN = TRUE 00B6 : } 00B6 : } 00B6 : } Net::LDAP=HASH(0xc3064) received: 30 17 02 01 02 65 12 0A 01 01 04 00 04 0B 56 4C 0....e........VL 56 20 43 6F 6E 74 72 6F 6C __ __ __ __ __ __ __ V Control 0000 30 23: SEQUENCE { 0002 02 1: INTEGER = 2 0005 65 18: [APPLICATION 5] { 0007 0A 1: ENUM = 1 000A 04 0: STRING = '' 000C 04 11: STRING = 'VLV Control' 0019 : } 0019 : } search failed with 1 At 08:39 PM 6/6/01 +0100, Graham Barr wrote: >Can you add > > $ldap->debug(15); > >just before the ->search and send the output on STDERR > >Graham. > >On Wed, Jun 06, 2001 at 02:55:23PM -0400, David A. Pinkowitz wrote: > > I've added the sort controls now. I have tested the sort control alone > and > > it works. But with vlv it gives me trouble. Here is my new code: > > > > -- > > $vlv = Net::LDAP::Control::VLV->new( > > before => 0, # No entries before target entry > > after => 2, # number of entries after target entry > > content => 0, #If set to 0, list size is unknown > > offset => 1, # Target entry is the first > > ); > > > > $sort = Net::LDAP::Control::Sort->new( > > order => "sn givenname" > > ); > > > > $mesg=$ldap->search( > > filter => '(&(|(|(sn=*) (givenname=*)) > > (mail=*))(objectclass=person))', > > base => 'ou=People,o=company.com', > > attrs => $anonAttr, > > control => [ $sort, $vlv ], > > ); > > > > ($resp) = $mesg->control( LDAP_CONTROL_VLVRESPONSE ) or die; > > $vlv->response( $resp ); > > -- > > > > If I leave the last two lines on, I will die when getting the > > VLVRESPONSE. If I remove those lines, I get an error 1, which I > understand > > is an LDAP Operations Error. I'm not sure what I'm doing wrong or what I > > should look for. I believe that I have copied sample code from the > > documentation correctly. Any advice? Thanks to those who have responded > > already. > > > > > > > > -- > > David A. Pinkowitz > > UniPress Software, Inc. > > dpi...@un... > > (732) 287-2100 ext. 943 > > > > > > -- David A. Pinkowitz UniPress Software, Inc. dpi...@un... (732) 287-2100 ext. 943 |