Re: Request methods not found

[prev] [thread] [next] [Date index for 2004/11/01]

From: Geoffrey Young
Subject: Re: Request methods not found
Date: 16:51 on 01 Nov 2004

Marina Markus wrote:
> Hello,
>  
> With Geoffrey Young's generous help I have successfully implemented
> authentication using my own handler subroutine defined as PerlAuthenHandler.

:)


> This works OK in RedHat but not on SGI (IRIX 6.2). Call to the handler fails
> complaining that it cannot find request object methods, be it "connection"
> or "get_basic_auth_pw", saying, for example:
>  
> [Mon Nov  1 12:54:13 2004] [error] Can't locate object method
> "get_basic_auth_pw" via package "Our::Auth" at
> /usr/local/lib/perl5/site_perl/5.005/Our/Auth.pm line 16, <DATA> chunk
> 225.\n

well, that message says that it can't find get_basic_auth_pw() via
Our::Auth.  it should be looking for it via the Apache class, not Our::Auth.
 if you're looking for it via $r blessed into Our::Auth you need to make
sure that you're doing subclassing properly for mod_perl (which is a bit
different than normal perl subclasses).  see

  http://www.modperlcookbook.org/code/ch10/Cookbook/Apache.pm

for an example.

if you're not trying any subclassing tricks then something is definitely
amuck - $r should be an 'Apache' object (or 'Apache::RequestRec' in mp2)
when you call $r->note_basio_auth_pw.

>  
> These methods should come with the installation of mod_perl, shouldn't they?

yes.

> A bare installation of Apache 1.3.31+mod_perl 1.29 on a RedHat works OK
> without demanding any addition Perl modules to be installed. 

that's right.  are you rolling your own on SGI or using a pre-compiled
package?  if the package is pre-compliled you might want to make sure that
it's mod_perl 1.2X and not mod_perl 1.99_XX, which is the precursor to
mod_perl 2.0 and a completely different beast.

>  
> Maybe the ancient Perl version (5.005) is to blame?

nope.

as I said, based on the message above something is amuck that looks to have
nothing to do with mod_perl, but rather the way that get_basic_auth_pw() is
being invoked.

HTH

--Geoff

        -- 
        Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Request methods not found
Marina Markus 16:19 on 01 Nov 2004

Re: Request methods not found
Geoffrey Young 16:51 on 01 Nov 2004

Re: Request methods not found
Marina Markus 10:37 on 02 Nov 2004

Re: Request methods not found
Martin Moss 10:56 on 02 Nov 2004

Re: Request methods not found
Geoffrey Young 13:08 on 02 Nov 2004

RE: Request methods not found
Marina Markus 14:18 on 02 Nov 2004

RE: Request methods not found
Martin Moss 16:11 on 02 Nov 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52