Re: Perl not allowed here

2004-08-06 Thread Geoffrey Young

> Yup, Apache now starts without errors, but HTML::Mason still doesn't seem
> to function. When I get to a .cgi page I get the source on the screen,
> instead of what should appear...
> 
> Is there any way I can get this working with apache/mod_perl 2, or should
> I settle for version 1?

I'm not a mason user, but perhaps this will help:

  http://www.masonhq.com/?ApacheModPerl2

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



Re: Perl not allowed here

2004-08-05 Thread Evert Meulie
-Original Message-
From: Stas Bekman <[EMAIL PROTECTED]>
To: Evert Meulie <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED], "Philippe M. Chiasson" <[EMAIL PROTECTED]>
Date: Thu, 05 Aug 2004 11:06:28 -0700
Subject: Re: Perl not allowed here

> Evert Meulie wrote:
> > Hi everyone!
> > 
> > When trying to start Apache I get:
> > Syntax error on line 376 of
> > /usr/local/apache-freeside/conf/Apache-Freeside.conf:
> > Perl not allowed here
> > 
> > The relevant paragraph from Apache-Freeside.conf:
> > PerlModule HTML::Mason
> > 
> > 
> > AddHandler perl-script .cgi
> > PerlHandler HTML::Mason
> > 
> > 
> > require "/usr/local/etc/freeside/handler.pl";
> > 
> >  
> > 
> > (the 'require' line is 376).
> > 
> > This paragraph I've cut/pasted from:
> > http://www.sisd.com/freeside/docs/install.html
> > 
> > 
> >  My apache version is: Apache/2.0.50 (Unix) mod_perl/1.99_14
> Perl/v5.8.4
> > DAV/2
> > 
> > 
> > 
> > Is there anyone out there who can enlighten me? I'm lost...   :-/
> 
> Evert, just take:
> 
>  > 
>  > require "/usr/local/etc/freeside/handler.pl";
>  > 
> 
> out of the  container and it will work.

'It' being Apache here?  ;-)

Yup, Apache now starts without errors, but HTML::Mason still doesn't seem
to function. When I get to a .cgi page I get the source on the screen,
instead of what should appear...

Is there any way I can get this working with apache/mod_perl 2, or should
I settle for version 1?


Regards,
   Evert


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



Re: Perl not allowed here

2004-08-05 Thread Geoffrey Young


Philippe M. Chiasson wrote:

> Unless geoff takes this one, I'll take care of it by tomorrow.

it's all yours :)

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



Re: Perl not allowed here

2004-08-05 Thread Philippe M. Chiasson

Stas Bekman wrote:
Philippe M. Chiasson wrote:

Hmm, I think we ought to start with:
- PerlModule, PerlRequire,  in .htaccess is missing
  http://marc.theaimsgroup.com/?t=10537008871&r=1&w=2
  Owner: geoff

 sections in .htaccess would be executed on every request, so that's
quite DWIM. In other containers, like  and others, on server 
startup
only, so not DWIM at all.

As long as this is clearly documented, I think it's fine.
Unless geoff takes this one, I'll take care of it by tomorrow.
--

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


Re: Perl not allowed here

2004-08-05 Thread Stas Bekman
Philippe M. Chiasson wrote:
Hmm, I think we ought to start with:
- PerlModule, PerlRequire,  in .htaccess is missing
   http://marc.theaimsgroup.com/?t=10537008871&r=1&w=2
   Owner: geoff

 sections in .htaccess would be executed on every request, so that's
quite DWIM. In other containers, like  and others, on server 
startup
only, so not DWIM at all.
As long as this is clearly documented, I think it's fine.
--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.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


Re: Perl not allowed here

2004-08-05 Thread Philippe M. Chiasson

Stas Bekman wrote:
Philippe M. Chiasson wrote:
[...]
Philippe, has the allowed placement of  sections changed in mp2?
For now,  sections are still limited to server scope. I have a patch
to open that up to OR_ALL ( .htaccess and all) but I am not sure
of exactly what behaviour a user would expect from a  section in a
 container. For example

 
   $Global::SomeVar = 'foo';
 


 
   $Global::SomeVar = 'bar';
 

Would certainly _not_ behave like people might expect. See what I mean ?

True. I suppose in mp1 it was just running them all at the server 
startup, having the latest value override the previous, isn't it?
Yup!
So we should either keep it as it was in mp1, or make it DWIM. If we 
keep the mp1 behavior we ought to allow it everywhere, but document that 
it's not DWIM. How hard would it be to make it DWIM? I suppose one will 
need to stash code-refs into the dir/r struct and run them at request 
time, which won't work across threads, so the source will need to be 
stored. doesn't seem very effective to me. 
Yes, exactly! If it were a simple matter to get them to run per directory/
location, I might have tried it. It just doesn't seem like it would be worth
spending time on implementing such a feature that, really, would just be
misusing what  sections were for.
One is ought to use the 
PerlHeaderParserHandler to accomplish DWIM in the example above.
Yes, I was just making a bad example of what someone _might_ do.
So I think it's the most sane to keep mp1's behavior. i.e.:
- allow  everywhere
Yes, and like I pointed out before, they would be executed for every
requests in the .htaccess cases.
- document that it's not DWIM (i.e. everythings is run at the server 
startup)
+1
--

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


Re: Perl not allowed here

2004-08-05 Thread Stas Bekman
Philippe M. Chiasson wrote:
[...]
Philippe, has the allowed placement of  sections changed in mp2?
For now,  sections are still limited to server scope. I have a patch
to open that up to OR_ALL ( .htaccess and all) but I am not sure
of exactly what behaviour a user would expect from a  section in a
 container. For example

  
$Global::SomeVar = 'foo';
  


  
$Global::SomeVar = 'bar';
  

Would certainly _not_ behave like people might expect. See what I mean ?
True. I suppose in mp1 it was just running them all at the server 
startup, having the latest value override the previous, isn't it?

So we should either keep it as it was in mp1, or make it DWIM. If we 
keep the mp1 behavior we ought to allow it everywhere, but document that 
it's not DWIM. How hard would it be to make it DWIM? I suppose one will 
need to stash code-refs into the dir/r struct and run them at request 
time, which won't work across threads, so the source will need to be 
stored. doesn't seem very effective to me. One is ought to use the 
PerlHeaderParserHandler to accomplish DWIM in the example above.

So I think it's the most sane to keep mp1's behavior. i.e.:
- allow  everywhere
- document that it's not DWIM (i.e. everythings is run at the server 
startup)

--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.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


Re: Perl not allowed here

2004-08-05 Thread Stas Bekman
Geoffrey Young wrote:
out of the  container and it will work.
Philippe, has the allowed placement of  sections changed in mp2?

yes.
  http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=105370080722053&w=2
but I'm sure that we have talked about it since then as well.
Hmm, I think we ought to start with:
- PerlModule, PerlRequire,  in .htaccess is missing
  http://marc.theaimsgroup.com/?t=10537008871&r=1&w=2
  Owner: geoff
Next see my comment in reply to the quoted link:
http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=105408316519401&w=2
--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.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


Re: Perl not allowed here

2004-08-05 Thread Philippe M. Chiasson

Geoffrey Young wrote:
out of the  container and it will work.
Philippe, has the allowed placement of  sections changed in mp2?

yes.
  http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=105370080722053&w=2
but I'm sure that we have talked about it since then as well.
It does make a lot of sense for PerlPassEnv, and the behaviour is logical.
I am still wondering about  sections though.
--Geoff
--

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


Re: Perl not allowed here

2004-08-05 Thread Geoffrey Young

> out of the  container and it will work.
> 
> Philippe, has the allowed placement of  sections changed in mp2?

yes.

  http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=105370080722053&w=2

but I'm sure that we have talked about it since then as well.

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



Re: Perl not allowed here

2004-08-05 Thread Philippe M. Chiasson

Stas Bekman wrote:
Evert Meulie wrote:
Hi everyone!
When trying to start Apache I get:
Syntax error on line 376 of
/usr/local/apache-freeside/conf/Apache-Freeside.conf:
Perl not allowed here
The relevant paragraph from Apache-Freeside.conf:
PerlModule HTML::Mason


AddHandler perl-script .cgi
PerlHandler HTML::Mason


require "/usr/local/etc/freeside/handler.pl";

 

(the 'require' line is 376).
This paragraph I've cut/pasted from:
http://www.sisd.com/freeside/docs/install.html
My apache version is: Apache/2.0.50 (Unix) mod_perl/1.99_14 Perl/v5.8.4
DAV/2

Is there anyone out there who can enlighten me? I'm lost...   :-/

Evert, just take:
 > 
 > require "/usr/local/etc/freeside/handler.pl";
 > 
out of the  container and it will work.
Philippe, has the allowed placement of  sections changed in mp2?
For now,  sections are still limited to server scope. I have a patch
to open that up to OR_ALL ( .htaccess and all) but I am not sure
of exactly what behaviour a user would expect from a  section in a
 container. For example

  
$Global::SomeVar = 'foo';
  


  
$Global::SomeVar = 'bar';
  

Would certainly _not_ behave like people might expect. See what I mean ?
--

Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5


signature.asc
Description: OpenPGP digital signature


Re: Perl not allowed here

2004-08-05 Thread Stas Bekman
Evert Meulie wrote:
Hi everyone!
When trying to start Apache I get:
Syntax error on line 376 of
/usr/local/apache-freeside/conf/Apache-Freeside.conf:
Perl not allowed here
The relevant paragraph from Apache-Freeside.conf:
PerlModule HTML::Mason


AddHandler perl-script .cgi
PerlHandler HTML::Mason


require "/usr/local/etc/freeside/handler.pl";

 

(the 'require' line is 376).
This paragraph I've cut/pasted from:
http://www.sisd.com/freeside/docs/install.html
 My apache version is: Apache/2.0.50 (Unix) mod_perl/1.99_14 Perl/v5.8.4
DAV/2

Is there anyone out there who can enlighten me? I'm lost...   :-/
Evert, just take:
> 
> require "/usr/local/etc/freeside/handler.pl";
> 
out of the  container and it will work.
Philippe, has the allowed placement of  sections changed in mp2?
--
__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.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


Perl not allowed here

2004-08-05 Thread Evert Meulie
Hi everyone!

When trying to start Apache I get:
Syntax error on line 376 of
/usr/local/apache-freeside/conf/Apache-Freeside.conf:
Perl not allowed here

The relevant paragraph from Apache-Freeside.conf:
PerlModule HTML::Mason


AddHandler perl-script .cgi
PerlHandler HTML::Mason


require "/usr/local/etc/freeside/handler.pl";

 

(the 'require' line is 376).

This paragraph I've cut/pasted from:
http://www.sisd.com/freeside/docs/install.html


 My apache version is: Apache/2.0.50 (Unix) mod_perl/1.99_14 Perl/v5.8.4
DAV/2



Is there anyone out there who can enlighten me? I'm lost...   :-/



Regards,
 Evert



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