I cannot seem to get custom configuration directives to work in
apache (1.3.11) modperl (1.21). I would presume the examples in the
book do not work either. I found someone having similar problems
in the list archives, to which Doug provided a workaround which also
does not work.
Any advice about this issue is helpful. Please reply to me directly as
well.
In Makefile.PL:
my @directives = (
...
{ name => 'Directive4',
errmsg => 'Anything',
args_how => 'RAW_ARGS',
req_override=> 'OR_ALL',
},
);
In the httpd.conf file:
<Perl>
require Apache::TestDirective;
delete $INC{'Apache/TestDirective.pm'};
</Perl>
#PerlModule Apache::TestDirective
Directive4 foo
What comes back:
Invalid command 'Directive4', perhaps mis-spelled or defined by a
module not included in the server configuration
Other details are...Modperl built with:
perl Makefile.PL APACHE_SRC=/usr/local/webadmin/${APACHE} DO_HTTPD=1
USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1 PERL_TRACE=1
and Apache built with:
./configure \
"--with-layout=Apache" \
"--prefix=/usr/local/www" \
"--enable-module=most" \
"--enable-shared=max" \
"--activate-module=src/modules/extra/mod_macro.c" \
"--activate-module=src/modules/perl/libperl.a" \
$ bin/httpd -V
Server version: Apache/1.3.11 (Unix)
Server built: Jan 30 2000 17:23:31
Server's Module Magic Number: 19990320:6
Server compiled with....
-D HAVE_MMAP
-D USE_MMAP_SCOREBOARD
-D USE_MMAP_FILES
-D USE_FLOCK_SERIALIZED_ACCEPT
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D HTTPD_ROOT="/usr/local/webadmin"
-D SUEXEC_BIN="/usr/local/webadmin/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/httpd.scoreboard"
-D DEFAULT_LOCKFILE="logs/httpd.lock"
-D DEFAULT_XFERLOG="logs/access_log"
-D DEFAULT_ERRORLOG="logs/error_log"
-D TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
-D ACCESS_CONFIG_FILE="conf/access.conf"
-D RESOURCE_CONFIG_FILE="conf/srm.conf"
$ bin/httpd -l
Compiled-in modules:
http_core.c
mod_so.c
mod_macro.c
mod_perl.c
$ perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
Platform:
osname=freebsd, osvers=3.3-release, archname=i386-freebsd
uname='freebsd somehost.org 3.3-release freebsd 3.3-release #0: sun nov 21
22:33:17 pst 1999 [EMAIL PROTECTED]:usrsrcsyscompilekern i386 '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O', gccversion=2.7.2.3
cppflags='-I/usr/local/include -DPERL_EMERGENCY_SBRK -DDEBUGGING_MSTATS
-DPACK_MALLOC -DTWO_POT_OPTIMIZE'
ccflags ='-I/usr/local/include -DPERL_EMERGENCY_SBRK -DDEBUGGING_MSTATS
-DPACK_MALLOC -DTWO_POT_OPTIMIZE '
stdchar='char', d_stdstdio=undef, usevfork=true
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=y, prototype=define
Linker and Libraries:
ld='cc', ldflags ='-Wl,-E -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-ldb -lm -lc -lcrypt
libc=/usr/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-DPIC -fpic', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Built under freebsd
Compiled at Nov 22 1999 16:25:57
%ENV:
PERL5LIB="/home/dave/lib/perl"
@INC:
/home/dave/lib/perl
/usr/local/lib/perl5/5.00503/i386-freebsd
/usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/perl5/site_perl/5.005
------
Dave Hayes - Consultant - Altadena CA, USA - [EMAIL PROTECTED]
>>> The opinions expressed above are entirely my own <<<
True freedom requires taking responsibility for your own life. That
frightens the hell out of too many people. They prefer to have Big
Brother holding a safety net for them, and they'll sell their own
birthright and their children's as well to keep it. --F. Paul Wilson