Hi,
after i recompiled the newest versions of perl, apache and mod_perl on
my home computer with the appropriate debug switches, i cannot reproduce
the Segmentation Faults any more, too.
At my machine at work i found out that the problem had to do with the
DBI module, which i additionally loaded. After installing the newest
version of DBI and/or not loading this module, no Segmentation faults
happened any more.
Concerning the PerlOptions:
>From the results below i conclude:
+Parent means everything is new in the virtual host. You have to add the
libs and paths you need all there.
+Clone means everything is "cloned" from the main configuration. To add
a "private" lib path you have to call a second startup script with the
lib path you need included. The PerlSwitches -Mlib=.. in the virtual
host section are ignored.
+inherit makes no difference at all (probably i did/do not understand
that option)
So after everything is "clear" now (i have to sleep one night over it) i
will continue moving from 1.3 to 2.0.
Thanks for your help
Helmut
1)
httpd.conf:
PerlRequire /tmp/install/apache2/conf/startup.pl
PerlSwitches -Mlib=/test1
NameVirtualHost 127.0.0.1:8080
<VirtualHost 127.0.0.1:8080>
..
PerlOptions +Parent
PerlModule Apache2
PerlSwitches -Mlib=/test2/lib
..
</VirtualHost>
startup.pl:
#!/usr/bin/perl
use Apache2;
use ModPerl::Registry;
1;
The result of @INC in a perl script:
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi/Apache2
/test2/lib
/usr/local/lib/perl5/5.8.0/i686-linux-thread-multi
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl
.
2)
httpd.conf:
PerlRequire /tmp/install/apache2/conf/startup.pl
PerlSwitches -Mlib=/test1
<VirtualHost 127.0.0.1:8080>
..
PerlOptions +Clone
PerlSwitches -Mlib=/test2/lib
..
</VirtualHost>
startup.pl: see above
@INC:
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi/Apache2
/test1
/usr/local/lib/perl5/5.8.0/i686-linux-thread-multi
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl
.
3)
+Clone and +inherit the same result as 2)
4)
httpd.conf:
PerlRequire /tmp/install/apache2/conf/startup.pl
PerlSwitches -Mlib=/test1
<VirtualHost 127.0.0.1:8080>
..
PerlOptions +Clone
PerlRequire /tmp/install/apache2/conf/addlib.pl
..
</VirtualHost>
startup.pl: see above
addlib.pl:
..
use lib '/addlib';
..
@INC:
/addlib
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi/Apache2
/test1
/usr/local/lib/perl5/5.8.0/i686-linux-thread-multi
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl
.
-----Urspr�ngliche Nachricht-----
Von: Stas Bekman [mailto:[EMAIL PROTECTED]]
Gesendet: Samstag, 25. Januar 2003 11:25
An: Helmut Zeilinger
Cc: [EMAIL PROTECTED]
Betreff: Re: PerlSwitches -M and @INC
Dr. Helmut Zeilinger wrote:
> I tried:
>
> PerlOptions +Parent
> # PerlOptions +Clone
>
>
> PerlModule Apache2
> PerlModule Apache::compat
> PerlSwitches -Mlib=/et/www/envirotex/lib
>
> The result is a "Segmentation fault" without any further messages on
the
> screen and in the error_log file.
I can't reproduce it. Please send in the backtrace from the core file
and the
rest of the details. See:
http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems
> When I try:
>
> # PerlOptions +Parent
> PerlOptions +Clone
>
>
> PerlModule Apache2
> PerlModule Apache::compat
> PerlSwitches -Mlib=/et/www/envirotex/lib
If you use the +Clone, it already inherits everything from the parent,
including @INC. So you don't need the last 3 lines. It works just fine
for me
with 'PerlOptions +Clone'.
Perhaps you can send in your httpd.conf after you have reduced it to the
very
minimum (including the minimal startup.pl that still reproduces the
problem)
> the result is:
>
> "[Thu Jan 23 09:12:19 2003] [error] Can't locate
> Emma/AuthCookieHandler.pm in @INC (@INC contains:
> /usr/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi/Apache2
> /usr/lib/perl5/5.8.0/i686-linux-thread-multi /usr/lib/perl5/5.8.0
> /usr/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl/5.6.1
> /usr/lib/perl5/site_perl .) at (eval 5) line 3.
>
> [Thu Jan 23 09:12:19 2003] [error] Can't load Perl module
> Emma::AuthCookieHandler for server www.et:0, exiting..."
>
> The Module "Emma::AuthCookieHandler" is in the path
> "/et/www/envirotex/lib". As i see from the message above the
additional
> lib path is missing from the @INC Array.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com