You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Warren Young <wa...@etr-usa.com> on 2003/05/28 17:45:18 UTC

Script preload fails on RH9 setup

I just tried moving a working Apache::ASP application to a Red Hat Linux
9 system, and couldn't get the Apache::ASP->Loader() statement to work.
Here's what I have at the end of my httpd.conf:

<Perl>
     Apache::ASP->Loader('/path/to/my/app', "asp\$",
         'Global' => '.',
         'Debug' => 0);
</Perl>

When I try to start the httpd server, it says:

Syntax error on line 1052 of /etc/httpd/conf/httpd.conf:
<Perl> directive missing closing '>'

Riiiigght.  Missing '>', sure....

Plainly it's confused, but why?  If I comment the contents of the <Perl>
block out, leaving just the tags, I get the same message.  If I comment
the entire block out, the app works flawlessly, but of course now I'm
not getting the benefits of global precompiling.  This block works just
fine on our "stock plus patches" Red Hat 7.2 and 7.3 systems.

For what it's worth, this <Perl> block is at the end of the file, just
after the <Files> block setting up ASP handling in my app's directory,
which follows the "PerlModule Apache::ASP" directive, which is outside
the Files block, which newer Apaches seem to want.

I'm using Apache::ASP 2.53 on a Red Hat 9 setup plus some newer Perl
modules from CPAN and some patches from Red Hat.  The OS was loaded just
this morning, so I don't think it's very far from "stock".

I imagine this is an Apache 2 or mod_perl 2 issue, but nothing I found
in this list's archives gives me any clues as to what's going on.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Script preload fails on RH9 setup

Posted by Josh Chamas <jo...@chamas.com>.
Warren Young wrote:
> Josh Chamas wrote:
> 
>>
>> I believe the mod_perl 2 on RedHat 9 is a pretty early dev release.
> 
> 
> True.  They shipped the _07 release, which dates back to September of 
> last year.
> 
>> Try upgrade to the latest mod_perl 1.99_xx.  I know that decent <Perl>
>> section support was only added more recently.
> 
> 
> I just installed the _09 release from source, and the problem persists. 
>  I haven't rebuilt Apache from source.  That's still stock.
> 
> Perhaps I need an "Apache::compat" directive in there somewhere?
> 

I would not think Apache::compat would make a difference.  How about
Randy's suggestion of <Perl >  with the space?

--Josh

________________________________________________________________
Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Script preload fails on RH9 setup

Posted by Warren Young <wa...@etr-usa.com>.
Josh Chamas wrote:
> 
> I believe the mod_perl 2 on RedHat 9 is a pretty early dev release.

True.  They shipped the _07 release, which dates back to September of 
last year.

> Try upgrade to the latest mod_perl 1.99_xx.  I know that decent <Perl>
> section support was only added more recently.

I just installed the _09 release from source, and the problem persists. 
  I haven't rebuilt Apache from source.  That's still stock.

Perhaps I need an "Apache::compat" directive in there somewhere?


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Script preload fails on RH9 setup

Posted by Warren Young <wa...@etr-usa.com>.
Warren Young wrote:
> Syntax error on line 1059 of /etc/httpd/conf/httpd.conf:

I should mention that line 1059 is the "</Perl>" line.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Script preload fails on RH9 setup

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Wed, 28 May 2003, Warren Young wrote:

> Josh Chamas wrote:
> > In your perl section, you could try, "no strict qw(subs);"
> 
> No dice.
> 
> > This seems like a bug on Apache::PerlSection, and you might report
> > it to the mod_perl list if you get this to work.
> 
> That was enough of a clue to fix it.  I pounded out the "use strict" at 
> the top of PerlSection.pm and everything's working beautifully. 
> Naturally this is not a final solution, but it will suffice for my 
> immediate purposes.

I think what should also work is leaving in the 'use strict;' and
inserting
   use Apache::Const -compile => ':common';
near the top of PerlSection.pm - that way, the Apache::OK would
be seen as a defined constant.

-- 
best regards,
randy


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Script preload fails on RH9 setup

Posted by Warren Young <wa...@etr-usa.com>.
Josh Chamas wrote:
> In your perl section, you could try, "no strict qw(subs);"

No dice.

> This seems like a bug on Apache::PerlSection, and you might report
> it to the mod_perl list if you get this to work.

That was enough of a clue to fix it.  I pounded out the "use strict" at 
the top of PerlSection.pm and everything's working beautifully. 
Naturally this is not a final solution, but it will suffice for my 
immediate purposes.

I will go ahead and post about the bug to the mod_perl list.

Thanks again, you two.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Script preload fails on RH9 setup

Posted by Josh Chamas <jo...@chamas.com>.
Warren Young wrote:
> Randy Kobes wrote:
> 
>>
>> I think also, at this time, Perl sections have to be written as
>>    <Perl >
>>      blah
>>    </Perl>
>> in mod_perl 2 (with the explicit whitespace in the opening
>> <Perl >).
> 
> 
> Surely they're not going to keep that syntax?  I hope it's just a 
> temporary bug they haven't gotten around to fixing yet.
> 
> Anyway, I tried that, and now the scripts appear to be precompiling, but 
> now httpd is failing to start for a new reason.  After the "(re)compiled 
> 20 scripts of 20 loaded..." line, it says:
> 
> [Wed May 28 13:05:05 2003] [error] failed to resolve handler 
> `Apache::PerlSection'
> Syntax error on line 1059 of /etc/httpd/conf/httpd.conf:
> Bareword "Apache::OK" not allowed while "strict subs" in use at 
> /usr/lib/perl5/site_perl/5.8.0//i386-linux-thread-multi/Apache/PerlSection.pm 
> line 47.!BEGIN not safe after errors--compilation aborted at 
> /usr/lib/perl5/site_perl/5.8.0//i386-linux-thread-multi/Apache/PerlSection.pm 
> line 58.!Compilation failed in require at (eval 57) line 3.!
> 
> UseStrict was set to 1 in my <Files> section, but I tried several 
> syntaxes to either undefine it or set it to something false and that 
> didn't help.  I also added "use Apache::compat" to the <Perl> block and 
> that didn't help, either.
> 

In your perl section, you could try, "no strict qw(subs);"

This seems like a bug on Apache::PerlSection, and you might report
it to the mod_perl list if you get this to work.

--Josh

________________________________________________________________
Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Script preload fails on RH9 setup

Posted by Warren Young <wa...@etr-usa.com>.
Randy Kobes wrote:
> 
> I think also, at this time, Perl sections have to be written as
>    <Perl >
>      blah
>    </Perl>
> in mod_perl 2 (with the explicit whitespace in the opening
> <Perl >).

Surely they're not going to keep that syntax?  I hope it's just a 
temporary bug they haven't gotten around to fixing yet.

Anyway, I tried that, and now the scripts appear to be precompiling, but 
now httpd is failing to start for a new reason.  After the "(re)compiled 
20 scripts of 20 loaded..." line, it says:

[Wed May 28 13:05:05 2003] [error] failed to resolve handler 
`Apache::PerlSection'
Syntax error on line 1059 of /etc/httpd/conf/httpd.conf:
Bareword "Apache::OK" not allowed while "strict subs" in use at 
/usr/lib/perl5/site_perl/5.8.0//i386-linux-thread-multi/Apache/PerlSection.pm 
line 47.!BEGIN not safe after errors--compilation aborted at 
/usr/lib/perl5/site_perl/5.8.0//i386-linux-thread-multi/Apache/PerlSection.pm 
line 58.!Compilation failed in require at (eval 57) line 3.!

UseStrict was set to 1 in my <Files> section, but I tried several 
syntaxes to either undefine it or set it to something false and that 
didn't help.  I also added "use Apache::compat" to the <Perl> block and 
that didn't help, either.

Thanks so far for your help, Randy and Josh.


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Script preload fails on RH9 setup

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Wed, 28 May 2003, Josh Chamas wrote:

> Warren Young wrote:
> > I just tried moving a working Apache::ASP application to a
> > Red Hat Linux 9 system, and couldn't get the
> > Apache::ASP->Loader() statement to work. Here's what I have
> > at the end of my httpd.conf:
> > 
> > <Perl>
> >     Apache::ASP->Loader('/path/to/my/app', "asp\$",
> >         'Global' => '.',
> >         'Debug' => 0);
> > </Perl>
> > 
> > When I try to start the httpd server, it says:
> > 
> > Syntax error on line 1052 of /etc/httpd/conf/httpd.conf:
> > <Perl> directive missing closing '>'
> > 
> > Riiiigght.  Missing '>', sure....
> > ...
> > I'm using Apache::ASP 2.53 on a Red Hat 9 setup plus some newer Perl
> > modules from CPAN and some patches from Red Hat.  The OS was loaded just
> > this morning, so I don't think it's very far from "stock".
> > 
> > I imagine this is an Apache 2 or mod_perl 2 issue, but nothing I found
> > in this list's archives gives me any clues as to what's going on.
> > 
> 
> I believe the mod_perl 2 on RedHat 9 is a pretty early dev release.
> Try upgrade to the latest mod_perl 1.99_xx.  I know that decent <Perl>
> section support was only added more recently.

I think also, at this time, Perl sections have to be written as
   <Perl >
     blah
   </Perl>
in mod_perl 2 (with the explicit whitespace in the opening
<Perl >).

-- 
best regards,
randy kobes


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: Script preload fails on RH9 setup

Posted by Josh Chamas <jo...@chamas.com>.
Warren Young wrote:
> I just tried moving a working Apache::ASP application to a Red Hat Linux
> 9 system, and couldn't get the Apache::ASP->Loader() statement to work.
> Here's what I have at the end of my httpd.conf:
> 
> <Perl>
>     Apache::ASP->Loader('/path/to/my/app', "asp\$",
>         'Global' => '.',
>         'Debug' => 0);
> </Perl>
> 
> When I try to start the httpd server, it says:
> 
> Syntax error on line 1052 of /etc/httpd/conf/httpd.conf:
> <Perl> directive missing closing '>'
> 
> Riiiigght.  Missing '>', sure....
> ...
> I'm using Apache::ASP 2.53 on a Red Hat 9 setup plus some newer Perl
> modules from CPAN and some patches from Red Hat.  The OS was loaded just
> this morning, so I don't think it's very far from "stock".
> 
> I imagine this is an Apache 2 or mod_perl 2 issue, but nothing I found
> in this list's archives gives me any clues as to what's going on.
> 

I believe the mod_perl 2 on RedHat 9 is a pretty early dev release.
Try upgrade to the latest mod_perl 1.99_xx.  I know that decent <Perl>
section support was only added more recently.

--Josh

________________________________________________________________
Josh Chamas, Founder                   phone:925-552-0128
Chamas Enterprises Inc.                http://www.chamas.com
NodeWorks Link Checking                http://www.nodeworks.com


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org