Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Update: Re: perl-LDAP process hangs

by Notromda (Pilgrim)
on Nov 04, 2002 at 15:22 UTC ( [id://210186]=note: print w/replies, xml ) Need Help??


in reply to perl-LDAP process hangs

Ok, I guess I'm not good enough XP-wise to edit my main post? Well, here's a new twist to the whole story. I logged in via ssh from my parent's home, ran the program, and it worked fine. I added the loop back in, changed back to the $ldap->add() style of code, and it successfully added about 50 entries.

When I got back to my office this morning, it doesn't work. Is there something in my RH8 environment that might be knocking it out of shape? UTF-8 ?

here's what the debug=>8 out yielded...

Net::LDAP=HASH(0x8d9c378) sending: Net::LDAP=HASH(0x8d9c378) received: 0000 12: SEQUENCE { 0002 1: INTEGER = 1 0005 7: [APPLICATION 1] { 0007 1: ENUM = 0 000A 0: STRING = '' 000C 0: STRING = '' 000E : } 000E : } Net::LDAP=HASH(0x8d9c378) sending:
And it just hangs right there. My current code base (just the ldap part):
use Net::LDAP; use Net::LDAP::Entry; my $ldap = Net::LDAP->new('localhost',debug=>8); my $bind_msg = $ldap->bind( dn => 'cn=Manager, dc=osprey,dc=net', password => 'secret' ); if ( my $bind_code = $bind_msg->code ) { die "Cannot bind:", $bind_msg->error, " (Code: $bind_code)"; } foreach my $username (sort keys %petra) { my $dn = "uid=${username}_osprey_net, ou=users, ispmanDomain=osprey.n +et, dc=osprey,dc=net"; my $ref = $petra{$username}; $result = $ldap->add( dn=> $dn,attr => [@$ref] ); $result->code && warn "$dn" ."failed to add entry: ", $result->error ; }

Replies are listed 'Best First'.
BIG UPDATE
by Notromda (Pilgrim) on Nov 04, 2002 at 15:30 UTC
    I was closer to the truth than I thought with the environment question. Redhat set the environment variable LANG to en_US.UTF-8. When I set it back to the more common en_US, the program starts to work. Now my question is why?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://210186]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-23 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found