You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Chris M <ch...@oneup.com> on 2003/10/08 17:45:32 UTC

Mod_perl with NLDBM issue

I am trying to get a new configuration going.  When I start 2.0.47 I get:

# /etc/rc.d/init.d/httpd start

Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf:
<Perl> directive missing closing '>'     [FAILED]

Line 1110 is the <Perl> line below:

PerlModule Apache::ASP
<Directory /usr/local/apache/htdocs/freeside-asp>
        <Files ~ (\.cgi)>
                AddHandler perl-script .cgi
                PerlHandler Apache::ASP
        </Files>
        <Perl>
               $MLDBM::RemoveTaint = 1;
        </Perl>
        PerlSetVar Global /usr/local/etc/freeside/asp-global/
        PerlSetVar Debug 2
</Directory>

Does anyone have any hints for me on what I am doing wrong?  I compiled
mod_perl with EVERYTHING=1 and the LoadModule statement is in the config.

If I comment these 3 lines the server starts just fine:

#        <Perl>
#               $MLDBM::RemoveTaint = 1;
#        </Perl>

Thanks,
Chris


Re: Mod_perl with NLDBM issue

Posted by Chris M <ch...@oneup.com>.
On 10/8/03 11:09 AM, "Josh Chamas" <jo...@chamas.com> wrote:

> Chris M wrote:
>> I am trying to get a new configuration going.  When I start 2.0.47 I get:
>> 
>> # /etc/rc.d/init.d/httpd start
>> 
>> Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf:
>> <Perl> directive missing closing '>'     [FAILED]
>> 
>> Line 1110 is the <Perl> line below:
>> 
>> PerlModule Apache::ASP
>> <Directory /usr/local/apache/htdocs/freeside-asp>
>>         <Files ~ (\.cgi)>
>>                 AddHandler perl-script .cgi
>>                 PerlHandler Apache::ASP
>>         </Files>
>>         <Perl>
>>                $MLDBM::RemoveTaint = 1;
>>         </Perl>
> 
> In recent versions of Apache::ASP, I do not believe you need RemoveTaint,
> so if you just remove that Perl block entirely, I think you will be fine.
> 
> Also be sure to explicitly set StateDir, or set NoState instead, otherwise
> your state file end up in Global/.state which is probably not what you want.

I'll read up on that.  Thanks.

> 
> Also note that some older versions of mod_perl 2 had problems parsing <Perl>
> blocks, so be sure to upgrade to the latest mod_perl 2 released if you
> want to use them.
> 
> Regards,
> 
> Josh
>

I'm running mod perl 1.99_09.  07 gave funky compile stuff. Using <Perl >
instead of <Perl> as Stas suggested seemed to help that.

I'll try taking it out though as well.

I posted a followup about the next problem, the <Directory> tag.  I've been
pounding on this for awhile so it is not surprising that simple things are
eluding me at the moment :)

Thanks,
Chris


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


Re: Mod_perl with NLDBM issue

Posted by Chris M <ch...@oneup.com>.
On 10/8/03 11:09 AM, "Josh Chamas" <jo...@chamas.com> wrote:

> Chris M wrote:
>> I am trying to get a new configuration going.  When I start 2.0.47 I get:
>> 
>> # /etc/rc.d/init.d/httpd start
>> 
>> Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf:
>> <Perl> directive missing closing '>'     [FAILED]
>> 
>> Line 1110 is the <Perl> line below:
>> 
>> PerlModule Apache::ASP
>> <Directory /usr/local/apache/htdocs/freeside-asp>
>>         <Files ~ (\.cgi)>
>>                 AddHandler perl-script .cgi
>>                 PerlHandler Apache::ASP
>>         </Files>
>>         <Perl>
>>                $MLDBM::RemoveTaint = 1;
>>         </Perl>
> 
> In recent versions of Apache::ASP, I do not believe you need RemoveTaint,
> so if you just remove that Perl block entirely, I think you will be fine.
> 
> Also be sure to explicitly set StateDir, or set NoState instead, otherwise
> your state file end up in Global/.state which is probably not what you want.

I'll read up on that.  Thanks.

> 
> Also note that some older versions of mod_perl 2 had problems parsing <Perl>
> blocks, so be sure to upgrade to the latest mod_perl 2 released if you
> want to use them.
> 
> Regards,
> 
> Josh
>

I'm running mod perl 1.99_09.  07 gave funky compile stuff. Using <Perl >
instead of <Perl> as Stas suggested seemed to help that.

I'll try taking it out though as well.

I posted a followup about the next problem, the <Directory> tag.  I've been
pounding on this for awhile so it is not surprising that simple things are
eluding me at the moment :)

Thanks,
Chris


Re: Mod_perl with NLDBM issue

Posted by Josh Chamas <jo...@chamas.com>.
Chris M wrote:
> I am trying to get a new configuration going.  When I start 2.0.47 I get:
> 
> # /etc/rc.d/init.d/httpd start
> 
> Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf:
> <Perl> directive missing closing '>'     [FAILED]
> 
> Line 1110 is the <Perl> line below:
> 
> PerlModule Apache::ASP
> <Directory /usr/local/apache/htdocs/freeside-asp>
>         <Files ~ (\.cgi)>
>                 AddHandler perl-script .cgi
>                 PerlHandler Apache::ASP
>         </Files>
>         <Perl>
>                $MLDBM::RemoveTaint = 1;
>         </Perl>

In recent versions of Apache::ASP, I do not believe you need RemoveTaint,
so if you just remove that Perl block entirely, I think you will be fine.

Also be sure to explicitly set StateDir, or set NoState instead, otherwise
your state file end up in Global/.state which is probably not what you want.

Also note that some older versions of mod_perl 2 had problems parsing <Perl>
blocks, so be sure to upgrade to the latest mod_perl 2 released if you
want to use them.

Regards,

Josh

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


Re: Mod_perl with NLDBM issue

Posted by Josh Chamas <jo...@chamas.com>.
Chris M wrote:
> I am trying to get a new configuration going.  When I start 2.0.47 I get:
> 
> # /etc/rc.d/init.d/httpd start
> 
> Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf:
> <Perl> directive missing closing '>'     [FAILED]
> 
> Line 1110 is the <Perl> line below:
> 
> PerlModule Apache::ASP
> <Directory /usr/local/apache/htdocs/freeside-asp>
>         <Files ~ (\.cgi)>
>                 AddHandler perl-script .cgi
>                 PerlHandler Apache::ASP
>         </Files>
>         <Perl>
>                $MLDBM::RemoveTaint = 1;
>         </Perl>

In recent versions of Apache::ASP, I do not believe you need RemoveTaint,
so if you just remove that Perl block entirely, I think you will be fine.

Also be sure to explicitly set StateDir, or set NoState instead, otherwise
your state file end up in Global/.state which is probably not what you want.

Also note that some older versions of mod_perl 2 had problems parsing <Perl>
blocks, so be sure to upgrade to the latest mod_perl 2 released if you
want to use them.

Regards,

Josh

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


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


Re: Patch to clarify need for space in ""

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
> Larry Leszczynski wrote:
> 
>> Hi -
>>
>> Appending patches for 2 files related to this issue:
>>
>>
>>>> Starting httpd: Syntax error on line 1110 of 
>>>> /etc/httpd/conf/httpd.conf:
>>>> <Perl> directive missing closing '>'     [FAILED]
>>>
>>>
>>> It should be <Perl > in mp2.
>>>                   ^
>>>                 space
>>
>>
>>
> 
> Thanks Larry.
> 
> I'll hold off on committing this patch, as Philippe has submitted a 
> patch to httpd-dev that makes the old behavior possible. So if his patch 
> is committed, we will only add a note "that for httpd  version < foo, 
> you need to use <Perl >" and keep the rest of the docs untouched. We are 
> waiting for the feedback.

The patch is now in the stable httpd-2.0 tree. So it should be included with 
2.0.48 or the latest 2.0.49. I'll update the docs.



__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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


Re: Patch to clarify need for space in ""

Posted by Stas Bekman <st...@stason.org>.
Larry Leszczynski wrote:
> Hi -
> 
> Appending patches for 2 files related to this issue:
> 
> 
>>>Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf:
>>><Perl> directive missing closing '>'     [FAILED]
>>
>>It should be <Perl > in mp2.
>>                   ^
>>                 space
> 
> 

Thanks Larry.

I'll hold off on committing this patch, as Philippe has submitted a patch to 
httpd-dev that makes the old behavior possible. So if his patch is committed, 
we will only add a note "that for httpd  version < foo, you need to use <Perl 
 >" and keep the rest of the docs untouched. We are waiting for the feedback.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


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


Patch to clarify need for space in ""

Posted by Larry Leszczynski <la...@furph.com>.
Hi -

Appending patches for 2 files related to this issue:

> > Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf:
> > <Perl> directive missing closing '>'     [FAILED]
> 
> It should be <Perl > in mp2.
>                    ^
>                  space


Larry Leszczynski
larryl@furph.com

-----
Index: PerlSections.pod
===================================================================
RCS
file: /home/cvspublic/modperl-docs/src/docs/2.0/api/Apache/PerlSections.pod,v
retrieving revision 1.5
diff -u -r1.5 PerlSections.pod
--- PerlSections.pod    9 Jun 2003 06:07:25 -0000       1.5
+++ PerlSections.pod    8 Oct 2003 17:10:19 -0000
@@ -20,6 +20,10 @@
 With C<E<lt>Perl E<gt>>...C<E<lt>/PerlE<gt>> sections, it is possible
 to configure your server entirely in Perl.

+B<Note:> There is a known limitation in Apache 2.0 that requires you
+to include a trailing space in the opening tag of the Perl section.
+I.e. you must use C<E<lt>Perl E<gt>> instead of C<E<lt>PerlE<gt>>.
+
 C<E<lt>Perl E<gt>> sections can contain I<any> and as much Perl code as
 you wish. These sections are compiled into a special package whose
 symbol table mod_perl can then walk and grind the names and values of
@@ -28,7 +32,7 @@
 Block sections such as C<E<lt>LocationE<gt>>..C<E<lt>/LocationE<gt>>
 are represented in a C<%Location> hash, e.g.:

-  <Perl>
+  <Perl >

   $Location{"/~dougm/"} = {
     AuthUserFile   => '/tmp/htpasswd',
-----
Index: config.pod
===================================================================
RCS
file: /home/cvspublic/modperl-docs/src/docs/2.0/user/config/config.pod,v
retrieving revision 1.45
diff -u -r1.45 config.pod
--- config.pod  8 Oct 2003 15:16:47 -0000       1.45
+++ config.pod  8 Oct 2003 17:15:57 -0000
@@ -163,10 +163,13 @@

   META: to be written

-=head2 C<E<lt>PerlE<gt>> Sections
+=head2 C<E<lt>Perl E<gt>> Sections

-  META: to be written. probably needs a dedicated chapter.
+With C<E<lt>Perl E<gt>>...C<E<lt>/PerlE<gt>> sections, it is possible
+to configure your server entirely in Perl.

+Please refer to the
+L<Apache::PerlSections|docs::2.0::api::Apache::PerlSections> manpage

 =head2 C<PerlSwitches>

@@ -488,7 +491,7 @@

 Suppose one of the hosts does not want to allow users to configure
 C<PerlAuthenHandler>, C<PerlAuthzHandler>, C<PerlAccessHandler> and
-E<lt>PerlE<gt> sections:
+E<lt>Perl E<gt> sections:

   <VirtualHost ...>
       PerlOptions -Authen -Authz -Access -Sections
@@ -966,7 +969,7 @@
   PerlAddVar                   ITERATE2   DIR
   PerlSetEnv                   TAKE2      DIR
   PerlPassEnv                  TAKE1      SRV
-  <Perl> Sections              RAW_ARGS   SRV
+  <Perl > Sections             RAW_ARGS   SRV
   PerlTrace                    TAKE1      SRV

 Handler assignment directives:
-----




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


Re: Mod_perl with NLDBM issue

Posted by Stas Bekman <st...@stason.org>.
Chris M wrote:
> I am trying to get a new configuration going.  When I start 2.0.47 I get:
> 
> # /etc/rc.d/init.d/httpd start
> 
> Starting httpd: Syntax error on line 1110 of /etc/httpd/conf/httpd.conf:
> <Perl> directive missing closing '>'     [FAILED]

It should be <Perl > in mp2.
                   ^
                 space

http://perl.apache.org/docs/2.0/api/Apache/PerlSections.html

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com