Hello. First, my configuration (i snipped as much as possible).
DocumentRoot /home/nikratio/Projekte/www-testing <Perl> use lib '/home/nikratio/Projekte/www-testing/lib'; </Perl> #PerlRequire "debug.pl" PerlModule CGI PerlModule Apache::Registry PerlModule SSIChainNG <Directory /home/nikratio/Projekte/www-testing> Options Includes Indexes ExecCGI <Files *.pl> SetHandler perl-script PerlSendHeader On PerlHandler SSIChainNG Apache::Registry </Files> <Files minitest.pl> # PerlFixupHandler Apache::DB </Files> AddHandler server-parsed .shtml Order deny,allow Allow from all AllowOverride None </Directory>
msg28533/pl00000.pl
Description: Test script
msg28533/pl00001.pl
Description: support file 1
Include File 2
msg28533/pl00002.pl
Description: Custom module 1
msg28533/pl00003.pl
Description: Custom module 2
So far so good. Here are the versions: Apache/1.3.24 (Unix) Debian GNU/Linux mod_perl/1.26 PHP/4.2.1 mod_fastcgi/2.2.10 mod_ssl/2.8.7 OpenSSL/0.9.6c mod_jk/1.1.0
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=linux, osvers=2.4.13, archname=i386-linux uname='linux duende 2.4.13 #1 wed oct 31 19:18:07 est 2001 i686 unknown ' config_args='-Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr -Dprivlib=/usr/share/perl/5.6.1 -Darchlib=/usr/lib/perl/5.6.1 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.6.1 -Dsitearch=/usr/local/lib/perl/5.6.1 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Duseshrplib -Dlibperl=libperl.so.5.6.1 -Dd_dosuid -des' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cc', ccflags ='-DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-DDEBIAN -fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='2.95.4 (Debian prerelease)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lgdbm -ldb -ldl -lm -lc -lcrypt perllibs=-ldl -lm -lc -lcrypt libc=/lib/libc-2.2.4.so, so=so, useshrplib=true, libperl=libperl.so.5.6.1 Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under linux Compiled at Jan 11 2002 04:09:18 @INC: /usr/local/lib/perl/5.6.1 /usr/local/share/perl/5.6.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.6.1 /usr/share/perl/5.6.1 /usr/local/lib/site_perl .
Basically, SSIParser is a Subclass of Apache::SSI. It parses text for SSI commands and executes them. It waqs modified to call a special method instead of printing to STDOUT, which would cause loops. SSIChainNG is a Subclass of Apache::OutputChain. It ties STDOUT to itself and searches all received data for SSI tags using SSI parser. minitest.pl causes a segfault on execution: ,---- | [Mon Jun 24 19:35:09 2002] [notice] child pid 4575 exit signal | Segmentation fault (11) `---- I couldn't solve this problem. But here are my various attempts to track the bug: 1. Joining the two print commands into one avoids the segfault: ,---- | print(header(), | start_html(), | '<!--#include virtual="t1.pl"-->', | h1("Main file"). | '<!--#include virtual="t2.html"-->', | end_html); `---- (painless execution). 2. tied *STDOUT refers to an other object after the first print commmand. 3. Debugging session 4. Ah, the sub-request invoiced by Apache::SSI ties *STDOUT also. Therefore it is tied to the wrong request object after execution of the sub request. But protecting STDOUT with local(*STDOUT) during the sub request doesn't help. Any ideas to fix the problem? Thanks, --Nikolaus