+ Post New Thread
Results 1 to 3 of 3
Coding Thread, Perl LDAP problem? in Coding and Web Development; I am trying to make use of RT and the ExternalAuth module for it. However I am getting this error: ...
  1. #1

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,649
    Thank Post
    514
    Thanked 2,443 Times in 1,891 Posts
    Blog Entries
    24
    Rep Power
    831

    Perl LDAP problem?

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

    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; 3rd June 2008 at 11:23 AM.

  2. #2

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,622
    Thank Post
    1,240
    Thanked 777 Times in 674 Posts
    Rep Power
    235
    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

  3. #3

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,649
    Thank Post
    514
    Thanked 2,443 Times in 1,891 Posts
    Blog Entries
    24
    Rep Power
    831
    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.

SHARE:
+ Post New Thread

Similar Threads

  1. Perl Moodle framework
    By el8linuxel8 in forum Coding
    Replies: 4
    Last Post: 26th March 2008, 12:03 PM
  2. Perl Help
    By danIT in forum Coding
    Replies: 9
    Last Post: 1st August 2007, 11:35 AM
  3. ldap on php
    By browolf in forum Web Development
    Replies: 11
    Last Post: 8th May 2007, 09:33 AM
  4. Python LDAP module version problem
    By CyberNerd in forum Coding
    Replies: 6
    Last Post: 14th December 2006, 01:18 PM
  5. Backup Perl Script
    By ranj in forum Scripts
    Replies: 1
    Last Post: 30th April 2006, 08:02 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •