You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Thomas Nagel <me...@thomasnagel.com> on 2005/07/11 10:46:57 UTC
Apache::Test too late for PerlSwitches
I currently try to get my feed wet with Apache::Test 1.25 on Debian
Sarge, perl 5.8.7 and mod_perl 2.0.1 (packages from unstable).
I follow the examples on
http://perl.apache.org/docs/general/testing/testing.html and always
notice the following:
perl Makefile.PL -apxs /usr/bin/apxs2 && make && make test
gives me
-- snip -------------------------------------------------------------
waiting 60 seconds for server to start: .Syntax error on line 111 of
/var/home/thomas/projects/********/t/conf/httpd.conf:
mod_perl is already running, too late for PerlSwitches
[ error]
server has died with status 255 (t/logs/error_log wasn't created, start
the server in the debug mode)
make: *** [run_tests] Error 143
-- snip -------------------------------------------------------------
Line 110 ff reads
<IfModule mod_perl.c>
PerlSwitches -Mlib=/var/home/thomas/projects/********/t
</IfModule>
and seems to be automatically generated.
Any ideas?
Thomas
Re: Apache::Test too late for PerlSwitches
Posted by Torsten Foertsch <to...@gmx.net>.
On Monday 11 July 2005 16:05, Michael Peters wrote:
> A list of directives that launch the interpreter would be pretty cool :)
http://perl.apache.org/docs/2.0/user/handlers/server.html#When_Does_perl_Start_To_Run
Torsten
Re: Apache::Test too late for PerlSwitches
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> Turns out it was documented, but not as "extra.last.conf.in" but rather
> as anything that matches "/\.last\.(conf|pl).in$/". But regardless, here
> is a patch that tries to make things a little clearer.
applied, thanks!
--Geoff
Re: Apache::Test too late for PerlSwitches
Posted by Michael Peters <mp...@plusthree.com>.
Geoffrey Young wrote:
>>>>>Maybe there should be a word of warning added to the Testing document
>>>>>for similar cases (unless I overread it of course ;-)
>>>
>>>
>>>probably. patches welcome :)
>>
>>
>>Along this lines, I was going to prepare a patch to make this a clearer
>>but I couldn't find where extra.last.conf.in was documented (since I
>>thought this would be a good place to explain what you might put into
>>it). I search perl.apache.org and while there are several mentions of
>>"extra.conf.in" I couldn't find any for "extra.last.conf.in".
>
>
> hmm, maybe it isn't documented there, then. I know I wrote about it in an
> article I did for perl.com
Turns out it was documented, but not as "extra.last.conf.in" but rather
as anything that matches "/\.last\.(conf|pl).in$/". But regardless, here
is a patch that tries to make things a little clearer.
--
Michael Peters
Developer
Plus Three, LP
Re: Apache::Test too late for PerlSwitches
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>>>>Maybe there should be a word of warning added to the Testing document
>>>>for similar cases (unless I overread it of course ;-)
>>
>>
>>probably. patches welcome :)
>
>
> Along this lines, I was going to prepare a patch to make this a clearer
> but I couldn't find where extra.last.conf.in was documented (since I
> thought this would be a good place to explain what you might put into
> it). I search perl.apache.org and while there are several mentions of
> "extra.conf.in" I couldn't find any for "extra.last.conf.in".
hmm, maybe it isn't documented there, then. I know I wrote about it in an
article I did for perl.com
http://www.perl.com/pub/a/2003/07/08/mod_perl.html?page=3
but I didn't realize it wasn't documented anywhere on perl.apache.org :)
and apparently stuff has changed since that article was written anyway - I'm
99% sure that putting PerlLoadModule in extra.conf.in didn't keep httpd from
starting back then. but who can remember that far back...
really, I hardly know what's documented and where anymore on the
perl.apache.org site and docs, as the docs have grown substantially over the
past few years and, for the most part, stas has done all the work.
so, if you're inclined enough to produce a patch, feel free to insert
extra.last.conf.in notes wherever it makes sense to you.
--Geoff
Re: Apache::Test too late for PerlSwitches
Posted by Michael Peters <mp...@plusthree.com>.
Geoffrey Young wrote:
>
> Michael Peters wrote:
>
>>Thomas Nagel wrote:
>>
>>
>>>>yeah. and that directive launches the interpreter, thus the collision.
>>>>
>>>>as stas suggested, extra.last.conf.in is the answer in this case.
>>>
>>>
>>>Cool && thanx, it now works as expected.
>>>
>>>Maybe there should be a word of warning added to the Testing document
>>>for similar cases (unless I overread it of course ;-)
>
>
> probably. patches welcome :)
Along this lines, I was going to prepare a patch to make this a clearer
but I couldn't find where extra.last.conf.in was documented (since I
thought this would be a good place to explain what you might put into
it). I search perl.apache.org and while there are several mentions of
"extra.conf.in" I couldn't find any for "extra.last.conf.in".
--
Michael Peters
Developer
Plus Three, LP
Re: Apache::Test too late for PerlSwitches
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Michael Peters wrote:
> Thomas Nagel wrote:
>
>>>yeah. and that directive launches the interpreter, thus the collision.
>>>
>>>as stas suggested, extra.last.conf.in is the answer in this case.
>>
>>
>>Cool && thanx, it now works as expected.
>>
>>Maybe there should be a word of warning added to the Testing document
>>for similar cases (unless I overread it of course ;-)
probably. patches welcome :)
>
>
> A list of directives that launch the interpreter would be pretty cool :)
PerlLoadModule
PerlConfigRequire
<Perl>
Perl
at least as far as I can tell.
--Geoff
Re: Apache::Test too late for PerlSwitches
Posted by Michael Peters <mp...@plusthree.com>.
Thomas Nagel wrote:
>>yeah. and that directive launches the interpreter, thus the collision.
>>
>>as stas suggested, extra.last.conf.in is the answer in this case.
>
>
> Cool && thanx, it now works as expected.
>
> Maybe there should be a word of warning added to the Testing document
> for similar cases (unless I overread it of course ;-)
A list of directives that launch the interpreter would be pretty cool :)
--
Michael Peters
Developer
Plus Three, LP
Re: Apache::Test too late for PerlSwitches
Posted by Thomas Nagel <me...@thomasnagel.com>.
> yeah. and that directive launches the interpreter, thus the collision.
>
> as stas suggested, extra.last.conf.in is the answer in this case.
Cool && thanx, it now works as expected.
Maybe there should be a word of warning added to the Testing document
for similar cases (unless I overread it of course ;-)
Thomas
Re: Apache::Test too late for PerlSwitches
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
Thomas Nagel wrote:
> Hi Geoff,
>
>
>> http://search.cpan.org/dist/Apache-SSLLookup/
>
>
> I use the above as a template and it worked until I did the following:
>
> PerlLoadModule ******::****::Configuration
>
> which works as the MyApache2/MyParameters.pm example for custom
> Configuration Directives at
> http://perl.apache.org/docs/2.0/user/config/custom.html
yeah. and that directive launches the interpreter, thus the collision.
>
> Is there anything I have to consider if I use custome Configuration
> directives with Apache::Test?
as stas suggested, extra.last.conf.in is the answer in this case.
--Geoff
Re: Apache::Test too late for PerlSwitches
Posted by Thomas Nagel <me...@thomasnagel.com>.
Hi Geoff,
> http://search.cpan.org/dist/Apache-SSLLookup/
I use the above as a template and it worked until I did the following:
PerlLoadModule ******::****::Configuration
which works as the MyApache2/MyParameters.pm example for custom
Configuration Directives at
http://perl.apache.org/docs/2.0/user/config/custom.html
Is there anything I have to consider if I use custome Configuration
directives with Apache::Test?
Thomas
Re: Apache::Test too late for PerlSwitches
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>>waiting 60 seconds for server to start: .Syntax error on line 111 of
>>/var/home/thomas/projects/********/t/conf/httpd.conf:
>>mod_perl is already running, too late for PerlSwitches
>
>
>>Line 110 ff reads
>>
>><IfModule mod_perl.c>
>> PerlSwitches -Mlib=/var/home/thomas/projects/********/t
>></IfModule>
>>
>>and seems to be automatically generated.
>
>
> yes, all of httpd.conf if automatically generated.
>
> you need to look for mod_perl directives before that line in httpd.conf and
> see which one is launching the interpreter. you also might want to try an
> Apache-Test-related module from CPAN to compare to your setup and see if you
> have any similar problems. here's one of mine that ought to serve as an example
>
> http://search.cpan.org/dist/Apache-SSLLookup/
Also you probably need to put your custom configuration into
t/conf/extra.last.conf.in and not t/conf/extra.conf.in
--
__________________________________________________________________
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: Apache::Test too late for PerlSwitches
Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> waiting 60 seconds for server to start: .Syntax error on line 111 of
> /var/home/thomas/projects/********/t/conf/httpd.conf:
> mod_perl is already running, too late for PerlSwitches
> Line 110 ff reads
>
> <IfModule mod_perl.c>
> PerlSwitches -Mlib=/var/home/thomas/projects/********/t
> </IfModule>
>
> and seems to be automatically generated.
yes, all of httpd.conf if automatically generated.
you need to look for mod_perl directives before that line in httpd.conf and
see which one is launching the interpreter. you also might want to try an
Apache-Test-related module from CPAN to compare to your setup and see if you
have any similar problems. here's one of mine that ought to serve as an example
http://search.cpan.org/dist/Apache-SSLLookup/
HTH
--Geoff