Welcome, Register for free! or Login below:
EduGeek.net RSS Feeds Register FAQ Members Social Groups User Map Calendar Search Today's Posts Mark Forums Read

Go Back   EduGeek.net Forums > Coding and Web Development > Coding
Reply
 
LinkBack Thread Tools Search Thread Language
Sponsored Links
Old 03-06-2008, 11:14 AM   #1
 
localzuk's Avatar
 
Join Date: Dec 2006
Location: Minehead, Somerset
Posts: 3,945
isle of man uk isle of man
Thanks: 49
Thanked 105 Times in 93 Posts
Blog Entries: 12
Rep Power: 31 localzuk is a name known to alllocalzuk is a name known to alllocalzuk is a name known to alllocalzuk is a name known to alllocalzuk is a name known to alllocalzuk is a name known to all
Send a message via MSN to localzuk Send a message via Yahoo to localzuk Send a message via Skype™ to localzuk
Default Perl LDAP problem?

I am trying to make use of RT and the ExternalAuth module for it. However I am getting this error:

Quote:
error: Can't coerce array into hash at /usr/local/share/request-tracker3.6/lib/RT/User_Vendor.pm line 176.
context:
...
172: # Now let's get connected
173: my $ldap = $self->_GetBoundLdapObj($config);
174: next unless ($ldap);
175:
176: $filter = Net::LDAP::Filter->new( '(&(' .
177: $attr_map->{'Name'} .
178: '=' .
179: $self->Name .
180: ')' .
...
code stack: /usr/local/share/request-tracker3.6/lib/RT/User_Vendor.pm:176
/usr/local/share/request-tracker3.6/lib/RT/User_Vendor.pm:359
/usr/share/request-tracker3.6/html/Callbacks/ExternalAuth/autohandler/Auth:35
/usr/share/request-tracker3.6/html/Elements/Callback:83
/usr/share/request-tracker3.6/html/autohandler:227
The corresponding chunk of code in the User_Vendor.pm file is below:

Code:
my $base            = $config->{'base'};
            my $filter          = $config->{'filter'};
            my $group           = $config->{'group'};
            my $group_attr      = $config->{'group_attr'};
            my $attr_map        = $config->{'attr_map'};
            my @attrs           = ('dn');

            # Empty parentheses as filters cause Net::LDAP to barf.
            # We take care of this by using Net::LDAP::Filter, but
            # there's no harm in fixing this right now.
            if ($filter eq "()") { undef($filter) };

            # Now let's get connected
            my $ldap = $self->_GetBoundLdapObj($config);
            next unless ($ldap);

            $filter = Net::LDAP::Filter->new(   '(&(' .
                                                $attr_map->{'Name'} .
                                                '=' .
                                                $self->Name .
                                                ')' .
                                                $filter .
                                                ')'
                                            );
I'm not a perl guru, so can anyone give me any clues as to what the problem is? Net::LDAP is installed as it should be.

Last edited by localzuk; 03-06-2008 at 11:23 AM..
  Reply With Quote
Old 03-06-2008, 12:24 PM   #2
 
dhicks's Avatar
 
Join Date: Aug 2005
Location: Alton, Hampshire
Posts: 1,427
Thanks: 124
Thanked 93 Times in 88 Posts
Rep Power: 28 dhicks is a name known to alldhicks is a name known to alldhicks is a name known to alldhicks is a name known to alldhicks is a name known to alldhicks is a name known to all
Default

Quote:
Originally Posted by localzuk View Post
error: Can't coerce array into hash at /usr/local/share/request-tracker3.6/lib/RT/User_Vendor.pm line 176.
Check the obvious bits first - are you trying to pass an array to a function in User_Vendor.pm instead of a hash?

--
David Hicks
  Reply With Quote
Old 03-06-2008, 12:31 PM   #3
 
localzuk's Avatar
 
Join Date: Dec 2006
Location: Minehead, Somerset
Posts: 3,945
isle of man uk isle of man
Thanks: 49
Thanked 105 Times in 93 Posts
Blog Entries: 12
Rep Power: 31 localzuk is a name known to alllocalzuk is a name known to alllocalzuk is a name known to alllocalzuk is a name known to alllocalzuk is a name known to alllocalzuk is a name known to all
Send a message via MSN to localzuk Send a message via Yahoo to localzuk Send a message via Skype™ to localzuk
Default

Quote:
Originally Posted by dhicks View Post
Check the obvious bits first - are you trying to pass an array to a function in User_Vendor.pm instead of a hash?

--
David Hicks
It's not my code, so I haven't the foggiest... And I think it is complaining that a hash is being sent instead of an array.

However, I can safely say I don't need to know about this any more, as I now have external authentication working using Apache PAM, SAMBA/Winbind and WebExternalAuth in RT.
  Reply With Quote
Reply

Register now for FREE and post messages!


Username: Password: Confirm Password: E-Mail: Confirm E-Mail:
Birthday:      
Image Verification
  I agree to forum rules 

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl Moodle framework el8linuxel8 Coding 4 26-03-2008 01:03 PM
Perl Help danIT Coding 9 01-08-2007 11:35 AM
ldap on php browolf Web Development 11 08-05-2007 09:33 AM
Python LDAP module version problem CyberNerd Coding 6 14-12-2006 02:18 PM
Backup Perl Script ranj Scripts 1 30-04-2006 08:02 PM


Tags
ldap, perl, request tracker, rt3.6


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search Thread
Search Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +1. The time now is 02:26 AM.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Copyright EduGeek.net