How do I add a photo to my comment or blog entry?
Test::Apache Failure with Apache 2.2
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > Apache HTTP Server > Test::Apache Failure with Apache 2.2 4 May 2008 22:01:08

  Recent blog posts: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Test::Apache Failure with Apache 2.2

David E. Wheeler 4 May 2008 22:01:08
 Hey All,

I've just been updating the test suite for
MasonX::Interp::Wit­hCallbacks and noticed that, while tests pass
perfectly with Apache 1, the server never starts up with Apache 2.
With Apache 2, I get:

benedict% perl Build.PL
Checking whether your kit is complete...
Looks good

Checking prerequisites...
Looks good

Creating new 'Build' script for 'MasonX-Interp-With­Callbacks' version
'1.18'

benedict% ./Build test --test_files t/08apache.t
Copying lib/MasonX/Interp/ithCallbacks.pm -> blib/lib/MasonX/Int­erp/
WithCallbacks.pm
/usr/local/bin/perl­ -I /Users/david/dev/Ki­neticode/MasonX-Inte­rp-
WithCallbacks/trunk­/blib/lib -I /Users/david/dev/Ki­neticode/MasonX-
Interp-WithCallback­s/trunk/blib/arch t/TEST -clean
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/local/bin/perl­ /Users/david/dev/Ki­neticode/
MasonX-Interp-WithC­allbacks/trunk/t/TES­T -clean
/usr/local/bin/perl­ -I /Users/david/dev/Ki­neticode/MasonX-Inte­rp-
WithCallbacks/trunk­/blib/lib -I /Users/david/dev/Ki­neticode/MasonX-
Interp-WithCallback­s/trunk/blib/arch t/TEST -bugreport -verbose=0
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/local/bin/perl­ /Users/david/dev/Ki­neticode/
MasonX-Interp-WithC­allbacks/trunk/t/TES­T -bugreport -verbose=0
/usr/local/apache2/­bin/httpd -d /Users/david/dev/Ki­neticode/MasonX-
Interp-WithCallback­s/trunk/t -f /Users/david/dev/Ki­neticode/MasonX-
Interp-WithCallback­s/trunk/t/conf/httpd­.conf -D APACHE2
using Apache/2.2.8 (prefork MPM)

waiting 60 seconds for server to start: .Loading CGI at runtime. You
could increase shared memory between Apache processes by preloading it
in your httpd.conf or handler.pl file
Syntax error on line 189 of /Users/david/dev/Ki­neticode/MasonX-Inte­rp-
WithCallbacks/trunk­/t/conf/httpd.conf:
mod_perl is already running, too late for PerlSwitches
...................­....................­....................­..
waiting 60 seconds for server to start: not ok
[ error] giving up after 61 secs. If you think that your system
is slow or overloaded try again with a longer timeout value.
by setting the environment variable APACHE_TEST_STARTUP­_TIMEOUT
to a high value (e.g. 360) and repeat the last command.

[ error] server failed to start! (t/logs/error_log wasn't created,
start the server in the debug mode)
benedict%

I'm not sure what the difference is here. Anyone know?

If you want to try it yourself, you can check out my code from svn here:

https://svn.kinetic­ode.com/MasonX-Inter­p-WithCallbacks/trun­k

I have Apache::Test 1.31 installed and am tying t run the tests
against my 2.2.8 Apache server with mod_perl 2.04 and Perl 5.10.

Thanks,

David
Add comment
David E. Wheeler 4 May 2008 00:52:33 permanent link ]
 On May 2, 2008, at 19:30, David E. Wheeler wrote:

I've just been updating the test suite for
MasonX::Interp::Wit­hCallbacks and noticed that, while tests pass
perfectly with Apache 1, the server never starts up with Apache 2.

Never mind. I figured it out. I had to change this:

<Perl>
use File::Spec::Functio­ns qw(catdir);
use lib catdir '@ServerRoot@', 'lib';
use lib catdir '@ServerRoot@', '..', 'blib';
use lib catdir '@ServerRoot@', '..', 'lib';
</Perl>

To be surrounded by an IfDefine:

<IfDefine !MODPERL2>
<Perl>
use File::Spec::Functio­ns qw(catdir);
use lib catdir '@ServerRoot@', 'lib';
use lib catdir '@ServerRoot@', '..', 'blib';
use lib catdir '@ServerRoot@', '..', 'lib';
</Perl>
</IfDefine>

Not sure why there's a difference here between mod_perl 1 and mod_perl
2, but I'm happy that the solution seems to be simple. Is this
something that's documented somewhere?

Thanks,

David
Add comment
Fred Moyer 4 May 2008 00:52:33 permanent link ]
 David E. Wheeler wrote:
On May 2, 2008, at 19:30, David E. Wheeler wrote:
I've just been updating the test suite for
MasonX::Interp::Wit­hCallbacks and noticed that, while tests pass
perfectly with Apache 1, the server never starts up with Apache 2.
Never mind. I figured it out. I had to change this:
<Perl>
use File::Spec::Functio­ns qw(catdir);
use lib catdir '@ServerRoot@', 'lib';
use lib catdir '@ServerRoot@', '..', 'blib';
use lib catdir '@ServerRoot@', '..', 'lib';
</Perl>
To be surrounded by an IfDefine:
<IfDefine !MODPERL2>
<Perl>
use File::Spec::Functio­ns qw(catdir);
use lib catdir '@ServerRoot@', 'lib';
use lib catdir '@ServerRoot@', '..', 'blib';
use lib catdir '@ServerRoot@', '..', 'lib';
</Perl>
</IfDefine>
Not sure why there's a difference here between mod_perl 1 and mod_perl
2, but I'm happy that the solution seems to be simple. Is this something
that's documented somewhere?

MODPERL2 is documented here, although it doesn't answer the question of
why the server starts with that directive and doesn't start without it:

http://perl.apache.­org/docs/2.0/user/po­rting/porting.html#M­aking_Code_Condition­al_on_Running_mod_pe­rl_Version

Most instances of the server not starting which have not been related to
the timeout being too low were missing test skips if a certain module
wasn't present (i.e. mod_alias, etc). I know I've fixed a few of those
issues, but there may be some remaining. My guess is that your httpd
builds may not have the exact same modules compiled in or loaded
dynamically.

I don't really understand why you need that perl section at all though,
Apache::Test should be picking up those library paths implicitly.
Add comment
David E. Wheeler 4 May 2008 06:13:43 permanent link ]
 On May 3, 2008, at 17:52, Fred Moyer wrote:

Not sure why there's a difference here between mod_perl 1 and
mod_perl 2, but I'm happy that the solution seems to be simple. Is
this something that's documented somewhere?
MODPERL2 is documented here, although it doesn't answer the question
of why the server starts with that directive and doesn't start
without it:

Yes, I knew that MODPERL2 was documented, I just don't know why it's
necessary here. Sorry I wasn't clearer.

Most instances of the server not starting which have not been
related to the timeout being too low were missing test skips if a
certain module wasn't present (i.e. mod_alias, etc). I know I've
fixed a few of those issues, but there may be some remaining. My
guess is that your httpd builds may not have the exact same modules
compiled in or loaded dynamically.

I'm not sure how the Perl block makes a difference.

I don't really understand why you need that perl section at all
though, Apache::Test should be picking up those library paths
implicitly.

When I removed it, tests failed under mod_perl 1. Odd.

Thanks,

David
Add comment
Fred Moyer 4 May 2008 08:45:57 permanent link ]
 David E. Wheeler wrote:
I'm not sure what the difference is here. Anyone know?
If you want to try it yourself, you can check out my code from svn here:

Tried to check it out but got the following message.

phred@harpua svn $ svn co
https://svn.kinetic­ode.com/MasonX-Inter­p-WithCallbacks/trun­k
svn: REPORT request failed on '/!svn/vcc/default'­
svn: Can't open file '/var/svn/db/revpro­ps/3730': Permission denied


I have Apache::Test 1.31 installed and am tying t run the tests against
my 2.2.8 Apache server with mod_perl 2.04 and Perl 5.10.

Can try it out here, I'm setting up a 5.10/2.2.8 test environment.
Add comment
David E. Wheeler 4 May 2008 21:43:22 permanent link ]
 On May 3, 2008, at 21:45, Fred Moyer wrote:

Tried to check it out but got the following message.
svn: REPORT request failed on '/!svn/vcc/default'­
svn: Can't open file '/var/svn/db/revpro­ps/3730': Permission denied

Oops, broke a permission when I changed a changelog entry yesterday.
Fixed.

I have Apache::Test 1.31 installed and am tying t run the tests
against my 2.2.8 Apache server with mod_perl 2.04 and Perl 5.10.
Can try it out here, I'm setting up a 5.10/2.2.8 test environment.

Great, thanks!

Best,

David
Add comment
David E . Wheeler 4 May 2008 22:01:08 permanent link ]
 Ah, WTF?

http://www.nntp.per­l.org/group/perl.cpa­n.testers/2008/05/ms­g1403980.html

Why would the base class be empty? :-(­

David
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > Apache HTTP Server > Test::Apache Failure with Apache 2.2 4 May 2008 22:01:08

see also:
Reversing a string (was: Re: Digest…
Re: Digest Number 2747
Training and Projects at MindTech…
пройди тесты:
see also:
The top ten reasons why the television…
Is Windows a Virus?
IBM acronyms

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .