As a quick follow-up, the "PerlModule Apache::Request" line is NOT needed in the 
httpd.conf file for Mason to work.  However, it was a very valuable debugging tool.

-----Original Message-----
From: DeAngelo Lampkin 
Sent: Thursday, November 07, 2002 11:21 AM
To: Tim Tompkins; [EMAIL PROTECTED]
Subject: RE: Can't locate object method "new" via package
"Apache::Request" (via Mason)...SOLVED


Thanks to Tim, Gareth, and Phillippe:

OK, I'll start with the solution to the problem and then drag on a bit for how I found 
it.

The problem was the location of a shared object file for the Apache Request object.  A 
file called libapreq.so.1 was located in /usr/local/lib (should have been in 
/usr/lib), which was ok for the test script that Phillippe gave me and the one-liner 
that Gareth gave me, but was apparently NOT ok for Mason in the context of mod_perl.  
I didn't figure this out until I tried Tim's suggestion of preloading the 
Apache::Request module inside of httpd.conf.  I ended up getting this thing:

Syntax error on line 362 of /usr/local/apache/conf/httpd.conf:
Can't load 
'/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Apache/Request/Request.so'
 for module Apache::Request: libapreq.so.1: cannot open shared object file: No such 
file or directory at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 
229.
 at /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/mod_perl.pm line 14
Compilation failed in require at (eval 4) line 3.

This isn't the most helpful error message in the world.  However, I knew Request.so 
and libapreq.so.1 were installed, but I didn't know if they were in places that the 
server process expected them to be.  So did a search for all the shared object files 
and noticed libapreq.so.1 file was sitting all by itself in /usr/local/lib, while 
about a billion other shared object files were inside of /usr/lib.  I moved 
libapreq.so.1 to the place where all the other cool shared object files hung out, 
crossed my fingers, and booya! It worked.  Apprently something about the way I 
configured the installation for libapreq was not very Mason friendly.

Anyway, thanks again for the help.  

DeAngelo

-----Original Message-----
From: Tim Tompkins [mailto:timt@;arttoday.com]
Sent: Thursday, November 07, 2002 10:16 AM
To: DeAngelo Lampkin; [EMAIL PROTECTED]
Subject: Re: Can't locate object method "new" via package
"Apache::Request" (via Mason)...


You should pre-load Apache::Request anyway,

    PerlModule Apache::Request
    PerlModule HTML::Mason::ApacheHandler

    <FilesMatch "\.msn$">
        SetHandler perl-script
        PerlHandler HTML::Mason::ApacheHandler
    </FilesMatch>


Regards,

Tim Tompkins
----------------------------------------------
Programmer
http://www.clipart.com/
http://www.rebelartist.com/
----------------------------------------------
----- Original Message -----
From: "Tim Tompkins" <[EMAIL PROTECTED]>
To: "DeAngelo Lampkin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, November 07, 2002 11:08 AM
Subject: Re: Can't locate object method "new" via package "Apache::Request"
(via Mason)...


> Is Apache::Request installed for perl 5.8.0?  Sounds like it's not loaded,
> anyway.
>
>
> Regards,
>
> Tim Tompkins
> ----------------------------------------------
> Programmer
> http://www.clipart.com/
> http://www.rebelartist.com/
> ----------------------------------------------
> ----- Original Message -----
> From: "DeAngelo Lampkin" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, November 07, 2002 10:54 AM
> Subject: RE: Can't locate object method "new" via package
"Apache::Request"
> (via Mason)...
>
>
> Hi Gareth,
>
> I'm using the latest version of Mason, Mason 1.15.  As I posted in my
> previous email, I put the following lines into my httpd.conf file per the
> instructions on Mason's website:
>
> PerlModule HTML::Mason::ApacheHandler
>     <FilesMatch "\.msn$">
>         SetHandler perl-script
>         PerlHandler HTML::Mason::ApacheHandler
>     </FilesMatch>
>
> The reason this wasn't posted on a Mason mailing list is that this didn't
> seem like a Mason problem per se and the Mason mailing list page
> specifically mentioned the Apache Request object (at least in part the
> source of my problem)as being something that is not directly Mason
> related( http://lists.sourceforge.net/lists/listinfo/mason-users ).  So I
> took the advice of the list moderator and posted on the mod_perl list
> instead.
>
> Thanks!
>
> DeAngelo
>
> -----Original Message-----
> From: Gareth Kirwan [mailto:gbjk@;thermeoneurope.com]
> Sent: Thursday, November 07, 2002 1:44 AM
> To: DeAngelo Lampkin; [EMAIL PROTECTED]
> Subject: RE: Can't locate object method "new" via package
> "Apache::Request" (via Mason)...
>
>
> You need to set Mason up better - probably.
>
> I'm an avid Mason user, and I've seen this a fair few times.
> If you want help, you're most likely to get it on the
> [EMAIL PROTECTED] list.
> However if you want to tell me the version of mason you're using it might
> help.
>
> You could use a mason-handler.pl with Mason 1.12 ( or 1.15) and the new
> Lexer / Compiller components.
>
> There should be a require statement in your httpd.conf.
> This gives you better control over data structures, variable scopes, and
an
> opportunity to handle persistent database connections better in the
handler.
>
> Check out the information on http://www.masonhq.com
>
> Hope this helps.
>
> Gareth
>
> -----Original Message-----
> From: DeAngelo Lampkin [mailto:dlampkin@;xencor.com]
> Sent: 06 November 2002 23:25
> To: [EMAIL PROTECTED]
> Subject: Can't locate object method "new" via package "Apache::Request"
> (via Mason)...
>
>
> Hey guys,
>
> You may remember me from such messages as "I can't get mod_perl to compile
> on Irix64 systems!".  Well now I've got a whole new problem that I need
your
> expertise on.
>
> I'm running Apache 1.3x and mod_perl 1.2x on a Linux system.  However,
> whenever I go to a page that should be handled by Mason (a perl templating
> system), I get the following error message:
> --------------------------------------------------------
> "[Wed Nov  6 11:56:20 2002] [error] Can't locate object method "new" via
> package "Apache::Request" at
> /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 878."
> --------------------------------------------------------------------
>
> My guess is that this (at some level)involves a configuration error of
some
> kind.  I added the following lines to my httpd.conf file per the
> instructions on Mason's website:
>
> ---------------------------------------------------------------
> PerlModule HTML::Mason::ApacheHandler
>     <FilesMatch "\.msn$">
>         SetHandler perl-script
>         PerlHandler HTML::Mason::ApacheHandler
>     </FilesMatch>
> ---------------------------------------------------------------------
>
> So I'm not sure what's going on here.   I looked through Apache/Request.pm
> and found no "new" method and I didn't find one inside of Apache.pm either
> (from which the Request module inherets).  However, I'm assuming this is
all
> correct and some magical ultra-Perl-guru AUTOLOAD-like functionality is
> going on somewhere.
>
>
> Does anyone have any ideas about what may be causing this?
>
>
> Thanks,
> DeAngelo
>
>
>

Reply via email to