1. Problem Description:
I'm testing with the httpd-std.conf file that comes with the FreeBSD port's
apache2 install, with the following additions:
LoadModule perl_module libexec/apache2/mod_perl.so
PerlModule Apache2
Alias "/cgi/" "/www/app/cgi/"
<Directory "/www/app/cgi/">
SetHandler perl-script
PerlHandler ModPerl::Registry
Options +ExecCGI
</Directory>
I have a CGI script in /www/app/cgi/ which dispatches based on PATH_INFO.
Example:
http://server.example.com/cgi/my-script/do/something
If I start up an httpd server (httpd -X, or normally) and visit any URL with
extra path elements, the requests always fail with one of the following
errors (usually the first one):
[Thu Nov 27 23:46:07 2003] [error] [client 172.16.1.2] Error: read 1 bytes,
expected 143 ('(null)') at
/usr/local/lib/perl5/site_perl/5.8.2/mach/Apache2/ModPerl/RegistryCooker.pm line 528.
[Thu Nov 27 23:46:08 2003] [error] [client 172.16.1.2] Error reading
'/www/app/cgi/my-script': 9:Bad file descriptor at
/usr/local/lib/perl5/site_perl/5.8.2/mach/Apache2/ModPerl/RegistryCooker.pm line 528.
As soon as I visit http://server.example.com/cgi/my-script (i.e., the script
name with no path info), the httpd instance "fixes" itself and everything
works fine again (until a new instance is spawned then it exhibits the same
behavior all over again).
Any CGI script does it, including the following:
#!/usr/bin/perl
print "\$PATH_INFO = '$ENV{PATH_INFO}'\n";
The behavior is the same under mod_perl 1.99_10. I can't remember what I was
running before that, when all this worked.
Also this FreeBSD is running under VMWare, if that matters.
2. Used Components and their Configuration:
*** mod_perl version 1.9911
*** using /usr/local/lib/perl5/site_perl/5.8.2/mach/Apache2/Apache/BuildConfig.pm
*** Makefile.PL options:
MP_APXS => /usr/local/sbin/apxs
MP_COMPAT_1X => 1
MP_GENERATE_XS => 1
MP_INST_APACHE2 => 1
MP_LIBNAME => mod_perl
MP_USE_DSO => 1
MP_USE_STATIC => 1
*** /usr/local/sbin/httpd -V
Server version: Apache/2.0.48
Server built: Nov 22 2003 00:13:11
Server's Module Magic Number: 20020903:4
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FLOCK_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr/local"
-D SUEXEC_BIN="/usr/local/bin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="etc/apache2/httpd.conf"
*** /usr/local/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
Platform:
osname=freebsd, osvers=4.9-release, archname=i386-freebsd
uname='freebsd cipater.at.home 4.9-release freebsd 4.9-release #0: thu oct 30
03:54:50 est 2003 [EMAIL PROTECTED]:usrobjusrsrcsysawk i386 '
config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.8.2/mach
-Dprivlib=/usr/local/lib/perl5/5.8.2 -Dman3dir=/usr/local/lib/perl5/5.8.2/man/man3
-Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.2/mach
-Dsitelib=/usr/local/lib/perl5/site_perl/5.8.2 -Dscriptdir=/usr/local/bin -Ui_malloc
-Ui_iconv -Uinstallusrbinperl -Dcc=cc -Doptimize=-O2 -pipe -march=pentiumpro
-Duseshrplib -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.2/BSDPAN" -Ud_dosuid
-Ui_gdbm -Dusethreads=n -Dusemymalloc=y'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=y, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.2/BSDPAN"
-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include',
optimize='-O2 -pipe -march=pentiumpro',
cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.2/BSDPAN" -DHAS_FPSETMASK
-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.4 20020320 [FreeBSD]', 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, prototype=define
Linker and Libraries:
ld='cc', ldflags ='-Wl,-E -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lgdbm -lm -lcrypt -lutil -lc
perllibs=-lm -lcrypt -lutil -lc
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-Wl,-R/usr/local/lib/perl5/5.8.2/mach/CORE'
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under freebsd
Compiled at Nov 27 2003 02:14:25
%ENV:
PERL_LWP_USE_HTTP_10="1"
@INC:
/usr/local/lib/perl5/site_perl/5.8.2/mach
/usr/local/lib/perl5/site_perl/5.8.2
/usr/local/lib/perl5/site_perl
/usr/local/lib/perl5/5.8.2/BSDPAN
/usr/local/lib/perl5/5.8.2/mach
/usr/local/lib/perl5/5.8.2
.
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html