Mark,

No, my "disco thing" does not load CGI, and Yes, I am using a modern
mod_perl2 post-API change.

Two things were needed : 
    1. The addition of "args_method => 'mod_perl'" to the
HTML::Mason::ApacheHandler() call 

    2. (from INSTALL mentioned before)

    [7.4.4] Apache2 additions
        Make sure that something similar to the following LoadModule commands
    are in your httpd.conf: 

        LoadModule perl_module  libexec/apache2/mod_perl.so
        LoadModule apreq_module libexec/apache2/mod_apreq2.so

        (Note that these should have been done as part of installing mod_perl
    and libapreq2, but not all installations do this).

        Add the following two lines in your httpd.conf:

        PerlModule Apache2::compat
        PerlModule Apache2::Request


Cheers to Netdisco developer Bill Fenner for figuring this all out.
-m

On Thu, Jun 15, 2006 at 11:31:32AM -0700, Mark Hedges wrote:
> 
> Are you sure you aren't using the RedHate Apache2 with mod_perl2
> which is really mod_perl 1.99 something and vendor libs that 
> make it work in a compatability mode like Apache1.3 libs?
> Or maybe your disco thing loads CGI?
> 
> The issue with compiled-from-source Apache2 was, for me, that 
> Apache2::RequestRec doesn't provide a param method at all.
> 
> The proper way in Apache2 to get params is to create an 
> Apache2::Request object like this:
> 
>    use Apache2::Request;
>    $req = Apache2::Request->new($r);
>    @foo = $req->param("foo");
>    $bar = $req->args("bar");    # args and param are equivalent
> 
> This is a big change.  Mason can't cope, AFAIK.
> 
> The solution for the config file is this:
> 
>     PerlModule CGI
>     PerlOptions +GlobalRequest
> 
> Mark
> 
> 
> On Thu, 15 Jun 2006, Max Baker wrote:
> 
> > From: Max Baker <[EMAIL PROTECTED]>
> > To: Francesc Guasch <[EMAIL PROTECTED]>
> > Cc: [email protected]
> > Date: Thu, 15 Jun 2006 09:21:54 -0700
> > Subject: Re: [Mason] WithApacheSession  Apache2
> > 
> > Bon Dia Francesc,
> > 
> > We figured this out recently on Netdisco.  I think the instructions on
> > masonhq are out of date.
> > 
> > In these is how we are getting MX:R:WAS to work w/ both apache1 and apache2 
> > :
> > http://netdisco.cvs.sourceforge.net/netdisco/netdisco/netdisco_apache.conf?view=markup
> > http://netdisco.cvs.sourceforge.net/netdisco/netdisco/netdisco_apache_dir.conf?view=markup
> > 
> > I don't remember what exectly changed, but the INSTALL docs might be up to
> > date as well.  They cover the setup of apache/mod_perl for mason for
> > netdisco.
> > 
> > http://netdisco.org/install.html
> > 
> > HTH,
> > -m
> > 
> > On Thu, Jun 15, 2006 at 11:21:47AM +0200, Francesc Guasch wrote:
> > > I'm trying to use MasonX::Request::WithApacheSession with mod_perl2
> > > and I can't make it work. I read this:
> > > 
> > > http://masonhq.com/?WithApacheSession
> > > 
> > > I have a custom handler, so I think it won't use the variables
> > > from PerlSetVar there. It does nothing.
> > > 
> > > I tried use it from the $ah, but then it fails to load and returns:
> > > 
> > >   The 'param_object' parameter ("Apache2::RequestRec=SCALAR(0x845bc48)")
> > >   to Apache::Session::Wrapper->new() does not have the method: 'param'.
> > > 
> > > I also tried 'MasonX::Request::WithApacheSession2', but then it fails :
> > > 
> > >   Can't locate Apache/RequestRec.pm in @INC (@INC
> > > 
> > > Is there an easy way to use sessions with mp2 , or should I go the old
> > > way and tie the Apache::Session:: module to a hash ?
> > > 
> > > Versions:
> > > 
> > > HTML::Mason::VERSION 1.33
> > > MasonX::Request::WithApacheSession 0.30
> > > mod_perl-2.0.2
> > > libapreq2-2.07
> > > 
> > > This is the handler from my module:
> > > 
> > > my $ah
> > >     = HTML::Mason::ApacheHandler->new
> > >             (
> > >             request_class => 'MasonX::Request::WithApacheSession',
> > >                   session_class          => 'Apache::Session::File',
> > >                   session_directory      => '/tmp/sessions/data',
> > >                   session_lock_directory => '/tmp/sessions/locks',
> > > 
> > > 
> > > 
> > 
> > 
> > _______________________________________________
> > Mason-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/mason-users
> > 


_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to