Stas Bekman wrote:

Steve Hay wrote:

Here's a minimal conf file which still fails when running "perl t/TEST -start" (or even "C:\apache2\bin\Apache.exe -t -d C:/Temp/modperl-2.0/t -f C:/Temp/modperl-2.0/t/conf/httpd.conf -DAPACHE2 -DPERL_USEITHREADS"):

=====
LoadModule perl_module C:\Temp\modperl-2.0\src\modules\perl\mod_perl.so
ServerName localhost:8529
Listen 8529
ServerRoot C:/Temp/modperl-2.0/t
DocumentRoot C:/Temp/modperl-2.0/t/htdocs
LogLevel debug
Listen 8530
<VirtualHost _default_:8530>
PerlOptions +Parent
<Perl >
1;
</Perl>
</VirtualHost>


The problem with this config, is that you don't handle @INC to use the fresh build. So it loads stuff from the previously installed system-wide mod_perl. Probably it doesn't affect the outcome, but please set it right (e.g. nuke the preinstalled things so it won't load them). You need something like this:

<VirtualHost _default_:8530>
 PerlSwitches -I/home/stas/apache.org/mp2-vhost/blib/lib/Apache2
 PerlSwitches -I/home/stas/apache.org/mp2-vhost/blib/arch/Apache2
 PerlSwitches -I/home/stas/apache.org/mp2-vhost/blib/lib
 PerlSwitches -I/home/stas/apache.org/mp2-vhost/blib/arch
 PerlSwitches -I/home/stas/apache.org/mp2-vhost/lib
 PerlOptions  +Parent
 <Perl>
   1;
 </Perl>
</VirtualHost>

In any case it works fine on linux.

Yes, it was using pre-installed stuff. Having deleted all the preinstalled stuff it then complained it couldn't load various things. I added a few @INC paths like this:


=====
LoadModule   perl_module C:\Temp\modperl-2.0\src\modules\perl\mod_perl.so
ServerName   localhost:8529
Listen       8529
ServerRoot   C:/Temp/modperl-2.0/t
DocumentRoot C:/Temp/modperl-2.0/t/htdocs
LogLevel     debug
Listen       8530
<VirtualHost _default_:8530>
 PerlSwitches -IC:/Temp/modperl-2.0/Apache-Test/lib
 PerlSwitches -IC:/Temp/modperl-2.0/blib/lib
 PerlSwitches -IC:/Temp/modperl-2.0/blib/arch
 PerlOptions  +Parent
 <Perl >
   1;
 </Perl>
</VirtualHost>
=====

It then stopped complaining that it couldn't find things, and "Apache.exe -t ..." now says syntax OK, but trying to start the server still fails as before.



modperl_mgv.c:264: package Apache::PerlSections not defined, attempting to load

Free to wrong pool 262770 not 925938.


The problems is this: perl uses dTHX; calls in some functions which disregards the passed context and retrieves the globally stored context. Which means that *every* time we select an interpreter, we must call PERL_SET_CONTEXT() and pass to it the parent interpreter of the currently used pool :(

In particular for your and mine segfaults the Perl_safesysfree() call is the one that uses dTHX and gets the wrong context at times, and then it crashes.

:(


I just saw your post on p5p, so I'll watch that to see what people say.



This short conf file is OK if I remove the "+Parent" line.

I can also "fix" it by removing the <Perl >...</Perl> section, but trying the same trick with the full vhost test setup (commenting out the appropriate add_config() call from t/htdocs/vhost/startup.pl) doesn't fix that :(

I notice that the <Perl >...</Perl> section in that startup.pl file is commented "this used to have problems on win32". Looks like it still does?


Probably it just moved to a different place. Most likely it's the same problem, I have explained above.

I also notice that the short conf file gives this syntax error if I change the <Perl > to <Perl>:

   Syntax error on line 10 of C:/Temp/modperl-2.0/t/conf/httpd.conf:
   <Perl> directive missing closing '>'


You need the current httpd cvs for <Perl> to work. Unfortunately it seems that Phillipe's fix won't make it to 2.0.48 (which should be released shortly), but only 2.0.49 :(

Oh, right. I'll have to start using CVS Apache2 as well, I think.


- Steve


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to