HI Tom,

Cool! Thomas Jefferson is using Mason! ;-)

Tom Jefferson wrote:
> Hello,
>  
>    My apologies if this is a stupid question, but I have looked high 
> and low to no avail for days. I can't get the autohandler to 
> work. Everything else with Mason and mod_perl works OK AFAIK. I have 
> been using Mason for my web pages and everything is working OK, but 
> then I decided to try autohandlers and that is where I have a problem.
You can use Mason without autohandlers? Didn't realize you could do 
that, actually.
>  
> Using the simple example from the Mason book 
> (http://www.masonbook.com/book/chapter-3.mhtml#TOC-ANCHOR-4). When I 
> try to open my page: http://il2.netteq.com/welcome.html all I see is 
> the % $m->call_next; instead of the embedded content. Below is what I 
> see in browser:
>  
> % $m->call_next;
> _Home_ <http://il2.netteq.com/>
>  
> I was getting this problem in my production pages when I tried to use 
> autohandlers so I have gone all the way back to a very simple example 
> but I still can't find the problem.
>  
> I have recompiled Apache 2.2.8, I have recompiled mod_perl 2.0.4, I 
> have installed latest Apache2 mods, I have installed latest Mason 
> 1.39, libexpat, libapreq2, etc. but nothing I do seems to fix this.
>  
I don't think your problem is that deep. Probably something in how you 
have it configured. My guess is that you did something unusual to make 
Mason NOT use autohandlers and have forgotten what that was. I do this 
sort of thing all the time.
> I didn't start recompiling and re-installing the latest items above 
> until I discovered my problem with autohandlers, but it didn't seem to 
> help or hurt.  All of my Mason items continue to work except for 
> autohandlers. By Mason stuff, I pretty much have only been using the 
> <%args%> and <%init%> sections in my pages and then using <% %> tags 
> to sprinkle dynamic perl in my pages.  This has always and continues 
> to work, it is just autohandlers that do not work for me.
>  
> You can see the Perl status on my site by using: 
> http://il2.netteq.com/perl-status
>  
My guess is that the issue is here, in the LocationMatch sections:
> <VirtualHost *:80>
>     ServerName il2.netteq.com
>     DocumentRoot /var/web/netteq.com/il2/portal
>  
>     PerlRequire      /var/web/netteq.com/il2/startup.pl
>     PerlTaintCheck   On
>     PerlWarn         On
>  
>     # Mason
>     PerlSetVar  MasonCompRoot  /var/web/netteq.com/il2/portal
>     PerlSetVar  MasonDataDir   /var/web/netteq.com/il2/mason-data
>  
>     <LocationMatch "(\.html|\.txt|\.pl)$">
>       SetHandler perl-script
>       PerlHandler HTML::Mason::ApacheHandler
>       #PerlHandler MyMason::MyApp
>     </LocationMatch>
>  
>     <LocationMatch "(\.m(html|txt|pl)|dhandler|autohandler)$">
>       SetHandler perl-script
>       PerlInitHandler Apache::Constants::NOT_FOUND
>       #PerlHandler MyMason::MyApp
>     </LocationMatch>
Are you by chance telling mod_perl and Apache to ignore autohanders and 
dhandlers. What happens if you take out the autohandler in the second 
LocationMatch? How about the dhandler?
I don't use LocationMatch myself, though, so I could be wrong here.

Another possibility - is there a space before the % $m->call_next() in 
your autohandler? %-lines must start on the first character; a space 
will cause Mason to skip it and display it, as you have seen. I got 
caught by that a lot when I was starting out.

Take care,

Kurt Hansen


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to