FINALE: (or finally!) Re: Can't create custom config directives(long)

2000-06-10 Thread Rob Tanner

And the really GOOD NEWS!!!  When I upgraded to mod_perl 1.24, the problem 
went away.  It all works like it's suppossed to now.

--On 06/09/00 12:02:40 -0700 Doug MacEachern <[EMAIL PROTECTED]> wrote:

> On Thu, 8 Jun 2000, Rob Tanner wrote:
>
>> MirrorWiseKeyFile', perhaps mis-spelled or defined by a module not
>> included in the server configuration
> ...
>> > PerlModule  Apache::MirrorWise
>
> this is becoming a common problem, try this bandaid, instead of that
> PerlModule line:
>
> 
> delete $INC{'Apache/MirrorWise.pm'};
> require Apache::MirrorWise;
> 
>
>

-- Rob

   _ _ _ _   __ _ _ _ _
  /\_\_\_\_\/\_\ /\_\_\_\_\_\
 /\/_/_/_/_/   /\/_/ \/_/_/_/_/_/  QUIDQUID LATINE DICTUM SIT,
/\/_/__\/_/ __/\/_//\/_/  PROFUNDUM VIDITUR
   /\/_/_/_/_/ /\_\  /\/_//\/_/
  /\/_/ \/_/  /\/_/_/\/_//\/_/ (Whatever is said in Latin
  \/_/  \/_/  \/_/_/_/_/ \/_/  appears profound)

  Rob Tanner
  McMinnville, Oregon
  [EMAIL PROTECTED]



Re: Can't create custom config directives (long)

2000-06-09 Thread Rob Tanner



--On 06/09/00 12:02:40 -0700 Doug MacEachern <[EMAIL PROTECTED]> wrote:

> On Thu, 8 Jun 2000, Rob Tanner wrote:
>
>> MirrorWiseKeyFile', perhaps mis-spelled or defined by a module not
>> included in the server configuration
> ...
>> > PerlModule  Apache::MirrorWise
>
> this is becoming a common problem, try this bandaid, instead of that
> PerlModule line:
>
> 
> delete $INC{'Apache/MirrorWise.pm'};
> require Apache::MirrorWise;
> 
>
>

Doug,

It fixed that problem and created another -- apache dies with a 
segmentation fault in processing other non-perl directives (the trace 
scrolled off my screen before I thought to cut and paste elsewhere).

However, I have in the short term resolved the problem for myself.  I 
downgraded to apache 1.3.6.  But to say that is not an apples to apples 
comparison.  The 1.3.6/1.23 build is completely static.  The original 
1.3.12/1.23 build was a dso except for mod_perl.c which was compiled in:

cheshire # /usr/local/apache/bin/httpd -l
Compiled-in modules:
  http_core.c
  mod_so.c
  mod_perl.c

That's my preferred construction, except I haven't figured out the exact 
build parameters to get 'make test' to work properly.  The httpd.conf it 
generates doesn't include the load and add modules directives and apache 
fails to start because it can't even parse "alias" directives, etc.   Is 
there a straight forward way to do a build that way and get "make test" to 
work?

So the bottom line is: that whatever was causing the problem in 1.3.12 
seems to not exist in 1.3.6.

-- Rob

   _ _ _ _   __ _ _ _ _
  /\_\_\_\_\/\_\ /\_\_\_\_\_\
 /\/_/_/_/_/   /\/_/ \/_/_/_/_/_/  QUIDQUID LATINE DICTUM SIT,
/\/_/__\/_/ __/\/_//\/_/  PROFUNDUM VIDITUR
   /\/_/_/_/_/ /\_\  /\/_//\/_/
  /\/_/ \/_/  /\/_/_/\/_//\/_/ (Whatever is said in Latin
  \/_/  \/_/  \/_/_/_/_/ \/_/  appears profound)

  Rob Tanner
  McMinnville, Oregon
  [EMAIL PROTECTED]



Re: Can't create custom config directives (long)

2000-06-09 Thread Doug MacEachern

On Thu, 8 Jun 2000, Rob Tanner wrote:
 
> MirrorWiseKeyFile', perhaps mis-spelled or defined by a module not
> included in the server configuration
...
> > PerlModule  Apache::MirrorWise

this is becoming a common problem, try this bandaid, instead of that
PerlModule line:


delete $INC{'Apache/MirrorWise.pm'};
require Apache::MirrorWise;






Can't create custom config directives (long)

2000-06-08 Thread Rob Tanner

Hi All,

(This message is VERY long --I'm trying to include as much information as I 
can)

Back on June 3 I posted a message about a problem I was having installing 
custom configuration directives.  Since then, I have been going over 
everything with a fine tooth comb -- which was probably not worth the 
effort at all because the whole process (at least as explained in the eagle 
book) is a piece of cake.  Basically, perl does all the hard work and all I 
do is a couple of tables.

Last night I rebuilt apache and mod_perl (versions 1.3.12 and 1.23 
respectively -- mod_perl being compiled in and not a dso) in order to build 
mod_perl with the PERL_TRACE option, and also to discover if there was 
something flaky in the previous build.  If the latter is the case, the 
flakiness carried over since it still fails.

Basically, when you invoke httpd as a daemon, it starts up successfully, 
parses the httpd.conf file, finds no problem and returns with an exit code 
of '0', meaning that it found no problem and forked off the daemonm copy. 
Thus, apachectl reports that apache was successfully started.  Howver, the 
daemon dies quickly and reports in the error_log:

MirrorWiseKeyFile', perhaps mis-spelled or defined by a module not
included in the server configuration

If I actually mess with the directive, spell it wrong or add or remove an 
argument, when apache originally parses the httpd.conf file it finds reason 
to complain, and apachectl does not come back and report a successful 
startup.  Rather, it report an error, run "apachectl configtest" to see the 
error.  Also, when I add various debug hooks into the callback for the 
directive, I can confirm that it's being invoked and getting the argument 
(it's a TAKE1).  So, whatever is going on is something else, and it's 
happening after the initial fork.

I have included the debug output below, tracing was set to "all".

> [root@cheshire apache]# bin/httpd -X
> perl_parse args: '/dev/null' ...allocating perl interpreter...ok
> constructing perl interpreter...ok
> ok
> running perl interpreter...ok
> mod_perl: 0 END blocks encountered during server startup
> PerlRequire: arg=`conf/startup.pl'
> attempting to require `conf/startup.pl'
> loading perl module 'Apache::Constants::Exports'...ok
> perl_cmd_fresh_restart: 1
> perl_cmd_setenv: 'PERL_DESTRUCT_LEVEL' = '-1'
> perl_cmd_setenv: 'DBMauthFile' = 'private/authen/passwdMD5'
> loading perl module 'Apache'...ok
> PerlModule: arg='Apache::MirrorWise'
> loading perl module 'Apache::MirrorWise'...ok
> init `PerlHandler' stack
> perl_cmd_push_handlers: @PerlHandler, 'Apache::MirrorWise'
> pushing `Apache::MirrorWise' into `PerlHandler' handlers
> blessing cmd_parms=(0xbfffda68)

However, in the error log we read:

> Syntax error on line 16 of /usr/local/apache/conf/perl.conf:
> Invalid command 'MirrorWiseKeyFile', perhaps mis-spelled or defined by a 
> module not included in the server configuration

This is the perl.conf file that contains the directive:


> PerlRequire   conf/startup.pl
> PerlFreshRestart  On
>
> #
> #  SetHandler perl-script
> #  PerlHandler Apache::Hello
> #
> #
> PerlSetEnv PERL_DESTRUCT_LEVEL -1
> PerlSetEnv DBMauthFile private/authen/passwdMD5
> #
> PerlModule  Apache::MirrorWise
> SetHandler  perl-script
> PerlHandler Apache::MirrorWise
> #
> MirrorWiseKeyFile conf/keyfile
>

Anybody have any ideas?

Thanks,
Rob


ATTACHED HISTORY:

Here follows the original post and a dialogue I had with another member of 
the list.  His suggestions were helpful, but did not resolve the issue.

> Hi all,
>
> I'm trying to create several custom configuration directives, and have
> pretty mucg followed the eample in the eagle book (pp 387-394).
>
> I start Apache up -- get no configuration complaints and apachectl comes
> back saying Apache started.  The info messages in the error log,
> however, indicate otherwise.  To wit:
>
> Invalid command 'MirrorWiseKeyFile', perhaps mis-spelled or defined by a
> module not included in the server configuration
>
> In Makefile.PL, I include:
> my @directives = (
>  { name => 'MirrorWiseKeyFile',
>errmsg   => 'location of password DB key file',
>args_how => 'TAKE1',
>req_override => 'OR_ALL' },
>   {
>  added to httpd.conf>  },
>  );
>
> command_table(\@directives);
>
> # See lib/ExtUtils/MakeMaker.pm for details of how to influence
> # the contents of the Makefile that is written.
> WriteMakefile(
>  'NAME' => __PACKAGE__,
>  'VERSION_FROM' => 'MirrorWise.pm',
>  'INC'  => Apache::src->new->inc,
>  'INSTALLSITEARCH'   => $install_here,
>  'INSTALLSITELIB'=> $install_here,
> );
>
> 1;
>
> The $install_here, above, is simply a scalar set to the module root
> in the Apache doc root