[Catalyst] Config problem with C::P::A::S::LDAP under mod_perl

Scott Karns scottkinsf at yahoo.com
Wed Mar 22 00:42:56 CET 2006



--- Adam Jacob <adam at stalecoffee.org> wrote:

> On Mar 21, 2006, at 10:21 AM, Scott Karns wrote:
> > [error] Can't use an undefined value as a HASH
> > reference at
> >
>
/usr/lib/perl5/vendor_perl/5.8.7/Catalyst/Plugin/Authentication/Stor
> > e/LDAP/Backend.pm line 100, <DATA> line
> > 225.\nCompilation failed in require at (eval 6)
> line
> > 3, <DATA> line 225.\n
> 
> Where is your app config coming from?
> 
> This error is being caused by there not being any
> value in:
> 
> $c->config->{'authentication'}->{'ldap'}
> 
> Perhaps you are having a problem with the path?
> 
> I'm adding some error checking around this, so it
> will at least give  
> a more instructional error message.
> 
> Check the contents of $c->config; your problem is
> there.
> 
> Adam
> 
Adam,

Thanks for the reply. That's exactly where I am at
this point. I created a local copy of the
C::P::A::S::LDAP set and inserted some cluck,
Data::Dumper lines and I see that under the built-in
server, $c-config is:

$c->config:$VAR1 = {
  'db' => {
    'database' => 'pykota',
    'password' => '9I#a2sAv3',
    'domain' => 'development',
    'server_time_zone' => 'America/Denver',
    'type' => 'main',
    'username' => 'pykotauser',
    'host' => 'gnu-prometheus.desertacademy.org',
    'driver' => 'Pg'
    },
  'name' => 'QR',
    'file' => 'quota_report.yaml',
    'static' => {
      'debug' => '0',
      'dirs' => [
        'css',
        'images',
        'js',
        'static'
        ]
      },
    'description' => 'Quota Reporter',
    'authentication' => {
      'use_session' => 1,
      'ldap' => {
        'user_field' => 'uid',
        'user_filter' =>
'(&(objectClass=posixAccount)(uid=%s))',
        'role_filter' =>
   '(&(objectClass=posixGroup)(memberUid=%s))',
        'start_tls_options' => {  
          'verify' => 'none'
          },
        'user_scope' => 'one',
        'role_basedn' =>
'ou=Group,dc=desertacademy,dc=org',
        'user_basedn' =>
'ou=people,dc=desertacademy,dc=org',
        'ldap_server' => 'ldap.desertacademy.org',
        'binddn' => 'anonymous',
        'role_field' => 'cn',
        'role_search_options' => {
          'deref' => 'always'
          },
        'user_search_options' => {
          'deref' => 'always'
          },
        'use_roles' => '1',
        'bindpw' => 'dontcarehow',
        'role_scope' => 'one',
        'ldap_server_options' => {
          'timeout' => '30'
          },
        'role_value' => 'uid',
        'start_tls' => '1'
        }
      },
    'View::Mason' => {
      'data_dir' => 'mdata',
      'comp_root' => 'mcomps'
      },
    'session' => {
      'relative' => '1',
      'storage' => 'QR_session',
      'expires' => '900'
      },
    'root' => bless( {
      'file_spec_class' => undef,
      'volume' => '',
      'dirs' => [
        '',
        'usr',
        'local',
        'pqv',
        'root'
        ]
      }, 'Path::Class::Dir' ),
    'home' => bless( {
      'file_spec_class' => undef,
      'volume' => '',
      'dirs' => [
        '',
        'usr',
        'local',
        'pqv'
        ]
      }, 'Path::Class::Dir' )
  };

Under apache2 and FastCGI, $c-config is:
$c->config:$VAR1 = {
  'file' => 'quota_report.yaml',
  'root' => bless( {
    'file_spec_class' => undef,
      'volume' => '',
      'dirs' => [
        '',
        'usr',
        'local',
        'pqv',
        'root'
        ]
      }, 'Path::Class::Dir' ),
    'home' => bless( {
      'file_spec_class' => undef,
      'volume' => '',
      'dirs' => [
        '',
        'usr',
        'local',
        'pqv'
        ]
     }, 'Path::Class::Dir' )
   };

I'm sure there's a problem with $c->config. I haven't
yet found out why it's different when running with the
built-in server vs. apache2.

-Scott

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Catalyst mailing list