Hi there,

I'm another person in the short but persistent line of people who can't
seem to get custom configuration directives to work.

I'm working with the Eagle book on this, and I've read all the relevant
threads I can find in the list archives, but since I'm having a slightly
different problem from the one my fellow strugglers were having, the
advice given to them didn't work for me.

The symptom:

On starting httpd, I get this response:

    Testing user file: NewConfigDirective           argumentToDirective

I tried doing away with the PerlModule directive and using the workaround
suggested by Doug MacEachern on June 9 2000, which was to put these
statements in the conf file:

<Perl>
    delete $INC{'/path/to/ConfigModule.pm'};
    require ConfigModule;
</Perl>

but when I do that, I get this:

    Testing user file:         delete $INC{'Apache/VI/Config.pm'}


In Makefile.PL I have:

    package ConfigModule;

    ## ... (as directed by Eagle)

    my @directives = (
            { name         => 'NewConfigDirective',
              errmsg       => 'argument to config directive',
              args_how     => 'TAKE1',
              req_override => 'RSRC_CONF'
            }
        );

and in ConfigModule.pm I have:

    sub NewConfigDirective ($$$) {
        my ($cfg, $parms, $arg) = @_;
        $cfg->{'NewConfigDirective'} = $arg;
    }


One clue I've found as to where something might be going wrong is that
when I comment out the 'args_how' line in Makefile.PL and run 'perl
Makefile.PL' I get this error:

    Can't determine prototype for `ConfigModule::NewConfigDirective':  at
    /usr/perl5/lib/site_perl/5.005/i686-linux/Apache/ExtUtils.pm line 133.

According to the Eagle book, I should be able to get rid of the 'args_how'
line as long as I provide a prototype in the subroutine definition, but it
seems I can't.

So it looks as though something isn't reading ConfigModule.pm on
WriteMakefile or on command_table and possibly not registering the handler
for the new directive, which might explain why I'm getting a syntax error
in the httpd.conf file when the server starts. But what would be causing
that to happen? I'm afraid I'm not familiar enough with the MakeMaker
mechanism to figure out what's going on. Then again, I'm not sure that's
really the problem, so disregard it if you think it's a red herring.

Any advice anyone can give would be very much appreciated.

-mike

=============================================================================

Details:

mod_perl version used is 1.23
perl version used is 5.005_03
apache version used is 1.3.11

$ perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=linux, osvers=2.2.5-22, archname=i686-linux
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='gcc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux
(egcs-1.1.2 release)
    cppflags='-Dbool=char -DHAS_BOOL'
    ccflags ='-Dbool=char -DHAS_BOOL'
    stdchar='char', d_stdstdio=undef, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=, so=so, useshrplib=true, libperl=libperl.so
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/usr/perl5/lib/5.00503/i686-linux/CORE'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Built under linux
  Compiled at Aug 22 1999 14:02:34
  @INC:
    /usr/perl5/lib/5.00503/i686-linux
    /usr/perl5/lib/5.00503
    /usr/perl5/lib/site_perl/5.005/i686-linux
    /usr/perl5/lib/site_perl/5.005
    .

$ /usr/sbin/httpd -V
Server version: Apache/1.3.11 (Unix)
Server built:   Feb  1 2000 21:17:00
Server compiled with....
 -D EAPI
 -D EAPI_MM
 -D EAPI_MM_CORE_PATH="/var/run/httpd.mm"
 -D HAVE_MMAP
 -D HAVE_SHMGET
 -D USE_SHMGET_SCOREBOARD
 -D USE_MMAP_FILES
 -D USE_FCNTL_SERIALIZED_ACCEPT
<default file locations cut>

$ /usr/sbin/httpd -l
Compiled-in modules:
  http_core.c
  mod_so.c
  mod_perl.c


-- 
Michael Styer           [EMAIL PROTECTED]
phone: 020 7603 5723    107 Shepherd's Bush Rd
fax: 020 7603 2504      London W6 7LP

Reply via email to