RE: Request methods not found

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

From: Martin Moss
Subject: RE: Request methods not found
Date: 16:11 on 02 Nov 2004
Having Just re-read your reply, (don't ask, waiting
for a machine sync to finish, bored...!) I noticed
that you said you didn't get an apache Object at all.

This is behaviour I've seen myself, and I never got a
decent understanding of why it happens?

So does anybody know under what circumstances it's
possible to NOT get an Apache object passed into your
handler subroutine?

Does this happen when a subrequest occurs?

Regards

Marty

 --- Marina Markus <mary@xxxxxxx.xxx.xx.xx> wrote: 
> Hello and many thanks to Martin and Geoffrey,
> 
> Martin was right - using "Dump" revealed that only
> "Our::Auth" was passed as
> an input variable (and the request was not passed at
> all). After I changed
> "PerlAuthenHandler Our::Auth->authen_handler" to
> "PerlAuthenHandler
> Our::Auth::authen_handler", the handler started to
> get the request as the
> first variable. 
> 
> If Martin can give such exact advices after a bad
> night, I ask what wonders
> he can do when he is OK :)
> 
> Thanks a lot to Geoffrey for Apache-Test, it looks
> very helpful.
> -Marina
> 
> -----Original Message-----
> From: Geoffrey Young
> [mailto:geoff@xxxxxxxxxxxxxxx.xxx] 
> Sent: Tuesday, November 02, 2004 3:09 PM
> To: Marina Markus
> Cc: modperl@xxxx.xxxxxx.xxx;
> martin_moss@xxxxxxxxxxx.xxx
> Subject: Re: Request methods not found
> 
> 
> > This code works OK in RedHat but cannot find
> "get_basic_auth_pw" in SGI.
> > Still, my feeling is that that something simple
> but imporant is omitted
> > in the code.
> 
> no, the code looks fine.  the issue isn't that
> get_basic_auth_pw() can't
> generally be found, but that $r isn't an Apache
> object, so your code is
> looking in the wrong place.  and you could be
> looking in the wrong place
> through no fault of your code at all - as martin
> suggested, you are probably
> using method handlers without knowing it.
> 
> besides the (good) advice that martin gave in his
> post, a really, really
> good way to track this down would be to use
> Apache-Test.  not that you are
> required to do this, but if you're interested in
> spending the up-front time
> to learn something new that will save you _lots_ of
> time in the future, give
> this a whirl...
> 
> first, install Apache-Test from CPAN:
> 
>   http://search.cpan.org/dist/Apache-Test/
> 
> then download this sample tarball:
> 
>  
>
http://perl.apache.org/~geoff/Apache-Test-skeleton-mp1.tar.gz
> 
> and tweak the distribution so that your handler is
> activated (follow the
> README to get started).  then try this:
> 
>   $ perl Makefile.PL -httpd
> /path/to/your/apache/bin/httpd
>   $ make
>   $ t/TEST -conf
>   $ t/TEST -start
> 
> and you can use your browser (or lynx or whatever)
> to hit
> http://localhost:8529/ and see your handler in
> action.  you could also take
> the time to tweak bug.t to act as a client for you.
> 
> the benefit here is that you now have a pristine
> environment with nothing
> attached to it except the code in question, and you
> can roll up your code
> (via make dist) and try it on different boxes.  you
> can even post a link to
> the tarball you have made for developers here to
> try, which would save
> iterations of 'what's the code? what's the
> configuration?" and so on.
> 
> now, if you don't do all of that, never fear - we're
> still here to help :)
> but it's something to keep in mind as you go forward
> with mod_perl related
> things.  Apache-Test is a wonderful development
> tool, so taking the time to
> get familiar with it will reap many, many benefits
> in the long term.
> 
> >>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.  
> > 
> > 
> > What checks can I do to see if Apache class is
> seen by mod_perl?
> 
> it is, or the 'use Apache' call would die.
> 
> HTH
> 
> --Geoff
> 
>  


	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com

        -- 
        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