You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Sreeji K Das <sr...@yahoo.com> on 2003/07/09 09:56:23 UTC

[MP2 - BUG ?] Issue handing Apache config. error messages

Following demonstrates the problem:
$ cat /tmp/test.conf 
<Perl >
@Include = "/tmp/test1.conf";
</Perl>

Listen 43499

$ cat /tmp/test1.conf 
<Perl >
$Port = 42480;
</Perl>

$ httpd -X -f /tmp/test.conf
Syntax error on line 7 of /tmp/test.conf:
Use of uninitialized value in subroutine entry at
/tmp/CVS/virgin/modperl-2.0/blib/lib/Apache2/Apache/PerlSection.pm
line 171.
-----------------------------
I've confirmed that ap_walk_config() in
modperl_config_insert() indeed returns a valid error
message and this gets propogated to post_config() in
PerlSection.pm & a dir $errmsg happens. I guess this
has something to do with the double eval() happening.
ie. one for Include, and then recursively for Port.

I'll debug it further; but it'd be nice if some1
already knows the issue and has a solution !

thx
Sreeji

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/

Re: [MP2 - BUG ?] Issue handing Apache config. error messages

Posted by Stas Bekman <st...@stason.org>.
Issac Goldstand wrote:
[...]
> (Starting
> 
>>>with mor_perl 2)...  I'm toying with the idea of starting the porting
>>>tutorial, but I want to make sure it's written well for clueless people
>>>(which I probably still at least half count as :-)) and with accurate
>>>content.
>>
>>porting or starting? We already have a porting guide:
>>http://perl.apache.org/docs/2.0/user/porting/porting.html
>>
>>a porting reference:
>>http://perl.apache.org/docs/2.0/user/porting/compat.html
>>
> 
> 
> Right - I read it, and it's reference.  It's not a good guide.  A guide
> should start with the basics.  The mp_1 guide is one of the most beautiful
> pieces of electronic documentation in existance!  It should be a book (I
> know: practical mod_perl)  Seriously though - the guide is what personally
> turned me on to mod_perl, but the above two documents make me shiver and
> stay the hell away from mp_2.  What's needed is a good friendly piece of
> documentation to get people moving... to mp_2

Certainly. Just remember that the guide is 4 years old. The 2.0 docs are a few 
  months old. So all we need is to make it better.

>>and even getting started:
>>http://perl.apache.org/docs/2.0/user/intro/start_fast.html
> 
> 
> Will look at it shortly - Let's not bite off more than we can chew in one
> mouthful.
> 
> 
>>I'd suggest to improve these docs where approapriate and start a new doc
> 
> only
> 
>>if it really doesn't fit into the existing docs.
> 
> 
> I'm just not sure if it *does* fit...

Let's see what you come up with and we can decides whether it fits or not. The 
idea is to avoid forks and have people collaborate on the single best source 
of documentation, rather than private projects. Private projects could be 
good, but given the complexity of mod_perl, having a good single source of 
documentation is a great boon for its acceptance.



__________________________________________________________________
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: [MP2 - BUG ?] Issue handing Apache config. error messages

Posted by Stas Bekman <st...@stason.org>.
Issac Goldstand wrote:
[...]
> (Starting
> 
>>>with mor_perl 2)...  I'm toying with the idea of starting the porting
>>>tutorial, but I want to make sure it's written well for clueless people
>>>(which I probably still at least half count as :-)) and with accurate
>>>content.
>>
>>porting or starting? We already have a porting guide:
>>http://perl.apache.org/docs/2.0/user/porting/porting.html
>>
>>a porting reference:
>>http://perl.apache.org/docs/2.0/user/porting/compat.html
>>
> 
> 
> Right - I read it, and it's reference.  It's not a good guide.  A guide
> should start with the basics.  The mp_1 guide is one of the most beautiful
> pieces of electronic documentation in existance!  It should be a book (I
> know: practical mod_perl)  Seriously though - the guide is what personally
> turned me on to mod_perl, but the above two documents make me shiver and
> stay the hell away from mp_2.  What's needed is a good friendly piece of
> documentation to get people moving... to mp_2

Certainly. Just remember that the guide is 4 years old. The 2.0 docs are a few 
  months old. So all we need is to make it better.

>>and even getting started:
>>http://perl.apache.org/docs/2.0/user/intro/start_fast.html
> 
> 
> Will look at it shortly - Let's not bite off more than we can chew in one
> mouthful.
> 
> 
>>I'd suggest to improve these docs where approapriate and start a new doc
> 
> only
> 
>>if it really doesn't fit into the existing docs.
> 
> 
> I'm just not sure if it *does* fit...

Let's see what you come up with and we can decides whether it fits or not. The 
idea is to avoid forks and have people collaborate on the single best source 
of documentation, rather than private projects. Private projects could be 
good, but given the complexity of mod_perl, having a good single source of 
documentation is a great boon for its acceptance.



__________________________________________________________________
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


Re: [MP2 - BUG ?] Issue handing Apache config. error messages

Posted by Issac Goldstand <ma...@beamartyr.net>.
----- Original Message -----
From: "Stas Bekman" <st...@stason.org>
To: "Issac Goldstand" <ma...@beamartyr.net>


> Issac Goldstand wrote:
> > Looking at it now, I tend to agree...  I just have a vague recollection
of
> > my first mod_perl 2 handler (Written only 2 weeks ago, though I dabbled
with
> > the C API 9 months ago, already) and reading it and playing with
httpd.conf
> > and overall being very confused.
>
> I've just committed the examples, hopefully they will appear online soon.
>
> > I'd consider having 2 guides written - a porting guide - yours is nice,
but
> > more as reference than as tutorial - and the second for newbies
(Starting
> > with mor_perl 2)...  I'm toying with the idea of starting the porting
> > tutorial, but I want to make sure it's written well for clueless people
> > (which I probably still at least half count as :-)) and with accurate
> > content.
>
> porting or starting? We already have a porting guide:
> http://perl.apache.org/docs/2.0/user/porting/porting.html
>
> a porting reference:
> http://perl.apache.org/docs/2.0/user/porting/compat.html
>

Right - I read it, and it's reference.  It's not a good guide.  A guide
should start with the basics.  The mp_1 guide is one of the most beautiful
pieces of electronic documentation in existance!  It should be a book (I
know: practical mod_perl)  Seriously though - the guide is what personally
turned me on to mod_perl, but the above two documents make me shiver and
stay the hell away from mp_2.  What's needed is a good friendly piece of
documentation to get people moving... to mp_2

> and even getting started:
> http://perl.apache.org/docs/2.0/user/intro/start_fast.html

Will look at it shortly - Let's not bite off more than we can chew in one
mouthful.

> I'd suggest to improve these docs where approapriate and start a new doc
only
> if it really doesn't fit into the existing docs.

I'm just not sure if it *does* fit...

  Issac



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


Re: [MP2 - BUG ?] Issue handing Apache config. error messages

Posted by Issac Goldstand <ma...@beamartyr.net>.
----- Original Message -----
From: "Stas Bekman" <st...@stason.org>
To: "Issac Goldstand" <ma...@beamartyr.net>


> Issac Goldstand wrote:
> > Looking at it now, I tend to agree...  I just have a vague recollection
of
> > my first mod_perl 2 handler (Written only 2 weeks ago, though I dabbled
with
> > the C API 9 months ago, already) and reading it and playing with
httpd.conf
> > and overall being very confused.
>
> I've just committed the examples, hopefully they will appear online soon.
>
> > I'd consider having 2 guides written - a porting guide - yours is nice,
but
> > more as reference than as tutorial - and the second for newbies
(Starting
> > with mor_perl 2)...  I'm toying with the idea of starting the porting
> > tutorial, but I want to make sure it's written well for clueless people
> > (which I probably still at least half count as :-)) and with accurate
> > content.
>
> porting or starting? We already have a porting guide:
> http://perl.apache.org/docs/2.0/user/porting/porting.html
>
> a porting reference:
> http://perl.apache.org/docs/2.0/user/porting/compat.html
>

Right - I read it, and it's reference.  It's not a good guide.  A guide
should start with the basics.  The mp_1 guide is one of the most beautiful
pieces of electronic documentation in existance!  It should be a book (I
know: practical mod_perl)  Seriously though - the guide is what personally
turned me on to mod_perl, but the above two documents make me shiver and
stay the hell away from mp_2.  What's needed is a good friendly piece of
documentation to get people moving... to mp_2

> and even getting started:
> http://perl.apache.org/docs/2.0/user/intro/start_fast.html

Will look at it shortly - Let's not bite off more than we can chew in one
mouthful.

> I'd suggest to improve these docs where approapriate and start a new doc
only
> if it really doesn't fit into the existing docs.

I'm just not sure if it *does* fit...

  Issac



Re: [MP2 - BUG ?] Issue handing Apache config. error messages

Posted by Stas Bekman <st...@stason.org>.
Issac Goldstand wrote:
> Right.  Could you possibly clarify the difference between  SetHandler
> perl-script and SetHandler modperl?  I'm still not sure I've got the
> straight of it yet...

You must be kidding ;) Have you read the sections at the URL posted below?

> Stas Bekman wrote:
> 
>>Sreeji K Das wrote:
>>[...]
>>You need to use 'SetHandler perl-script' for that, see:
>>http://perl.apache.org/docs/2.0/user/config/config.html#C_SetHandler_



__________________________________________________________________
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


Re: [MP2 - BUG ?] Issue handing Apache config. error messages

Posted by Issac Goldstand <ma...@beamartyr.net>.
Right.  Could you possibly clarify the difference between  SetHandler
perl-script and SetHandler modperl?  I'm still not sure I've got the
straight of it yet...

  Issac

Stas Bekman wrote:
> Sreeji K Das wrote:
> [...]
> You need to use 'SetHandler perl-script' for that, see:
> http://perl.apache.org/docs/2.0/user/config/config.html#C_SetHandler_




Re: [MP2 - BUG ?] Issue handing Apache config. error messages

Posted by Stas Bekman <st...@stason.org>.
Sreeji K Das wrote:
[...]
> able to start-up my application :-) However, it dies
> on a request - I need to debug this further (looks
> like
> print STDOUT used to work in the past, but now I need
> to say $r->print(..) - STDOUT was tied in the past &
> not so in mp2 ?). 

You need to use 'SetHandler perl-script' for that, see:
http://perl.apache.org/docs/2.0/user/config/config.html#C_SetHandler_

__________________________________________________________________
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: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [MP2 - BUG ?] Issue handing Apache config. error messages

Posted by Sreeji K Das <sr...@yahoo.com>.
thx for the reply. I had tried that patch, & but the
issue still exists. I've also found another issue
(http://www.mail-archive.com/modperl@apache.org/msg34746.html)

I'm porting an mp1 application. I wanted to go as much
as possible & list out the possible issues. After
patching for PerlSection (eval's in distinct
packages), 
moving all PerlPassEnv to the top (see the above link
for my post on this issue), and removing legacy
directives (bug specified in this post), I'm finally
able to start-up my application :-) However, it dies
on a request - I need to debug this further (looks
like
print STDOUT used to work in the past, but now I need
to say $r->print(..) - STDOUT was tied in the past &
not so in mp2 ?). 

I'll post any further issues as I proceed. Currently
we use PerlFreshRestart (works after I did few
patches) so that we need not down our site for
upgrades (know of statINC, but it does stat()'s which
we want to avoid; we have found PerlFreshRestart to be
the best solution so far). Our current motivation for
moving to mp2 is the following statement from the docs
:
"PerlFreshRestart is a mod_perl 1.0 legacy and doesn't
exist in mod_perl 2.0. A full teardown and startup of
interpreters is done on restart. "

thx
Sreeji

 --- "Philippe M. Chiasson" <go...@cpan.org> wrote: >
Yeah, this is a known bug. Recursive <Perl >
> sections are currently
> broken. I submitted a patch about this problem a
> while back, but we
> failed to reach concensus on which way was
> _the_right_way_ to solve the
> problem.
> 
> I am planning on revisiting this known bug in the
> near future, so you'll
> have to hold on until then, or maybe give a spin to
> one of the patch I
> posted archived here : 
> 
>
http://marc.theaimsgroup.com/?t=105401041500001&r=1&w=2
> 
> On Wed, 2003-07-09 at 15:56, Sreeji K Das wrote:
> > Following demonstrates the problem:
> > $ cat /tmp/test.conf 
> > <Perl >
> > @Include = "/tmp/test1.conf";
> > </Perl>
> > 
> > Listen 43499
> > 
> > $ cat /tmp/test1.conf 
> > <Perl >
> > $Port = 42480;
> > </Perl>
> > 
> > $ httpd -X -f /tmp/test.conf
> > Syntax error on line 7 of /tmp/test.conf:
> > Use of uninitialized value in subroutine entry at
> >
>
/tmp/CVS/virgin/modperl-2.0/blib/lib/Apache2/Apache/PerlSection.pm
> > line 171.
> > -----------------------------
> > I've confirmed that ap_walk_config() in
> > modperl_config_insert() indeed returns a valid
> error
> > message and this gets propogated to post_config()
> in
> > PerlSection.pm & a dir $errmsg happens. I guess
> this
> > has something to do with the double eval()
> happening.
> > ie. one for Include, and then recursively for
> Port.
> > 
> > I'll debug it further; but it'd be nice if some1
> > already knows the issue and has a solution !
> > 
> > thx
> > Sreeji
> > 
> >
>
________________________________________________________________________
> > Want to chat instantly with your online friends? 
> Get the FREE Yahoo!
> > Messenger http://uk.messenger.yahoo.com/
> > 
> 

> ATTACHMENT part 2 application/pgp-signature
name=signature.asc
 

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/

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


Re: [MP2 - BUG ?] Issue handing Apache config. error messages

Posted by "Philippe M. Chiasson" <go...@cpan.org>.
Yeah, this is a known bug. Recursive <Perl > sections are currently
broken. I submitted a patch about this problem a while back, but we
failed to reach concensus on which way was _the_right_way_ to solve the
problem.

I am planning on revisiting this known bug in the near future, so you'll
have to hold on until then, or maybe give a spin to one of the patch I
posted archived here : 

http://marc.theaimsgroup.com/?t=105401041500001&r=1&w=2

On Wed, 2003-07-09 at 15:56, Sreeji K Das wrote:
> Following demonstrates the problem:
> $ cat /tmp/test.conf 
> <Perl >
> @Include = "/tmp/test1.conf";
> </Perl>
> 
> Listen 43499
> 
> $ cat /tmp/test1.conf 
> <Perl >
> $Port = 42480;
> </Perl>
> 
> $ httpd -X -f /tmp/test.conf
> Syntax error on line 7 of /tmp/test.conf:
> Use of uninitialized value in subroutine entry at
> /tmp/CVS/virgin/modperl-2.0/blib/lib/Apache2/Apache/PerlSection.pm
> line 171.
> -----------------------------
> I've confirmed that ap_walk_config() in
> modperl_config_insert() indeed returns a valid error
> message and this gets propogated to post_config() in
> PerlSection.pm & a dir $errmsg happens. I guess this
> has something to do with the double eval() happening.
> ie. one for Include, and then recursively for Port.
> 
> I'll debug it further; but it'd be nice if some1
> already knows the issue and has a solution !
> 
> thx
> Sreeji
> 
> ________________________________________________________________________
> Want to chat instantly with your online friends?  Get the FREE Yahoo!
> Messenger http://uk.messenger.yahoo.com/
>