You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Kyle Hodgson <ky...@insitecom.com> on 2000/03/12 06:35:11 UTC

PerlLogHandler error messages...

So.

Solaris 2.7 on i386
Apache 1.3.12
mod_perl-1.21_02
Apache::DBILogConfig-0.01 (eventually)

So I have the "Apache modules with perl & C book".  It tells me how to
write a simple LogDBI module.  It tells me to install it with 

PerlLogHandler Apache::LogDBI

in my httpd.conf.  I have done so.  When I go to restart, I get an
error.

archangel/export/home/kyleh/project# apachectl configtest
Syntax error on line 957 of /usr/local/apache/conf/httpd.conf:
Invalid command 'PerlLogHandler', perhaps mis-spelled or defined by a
module not included in the server configuration

Ok.  apachectl restart just tells me to run configtest.  Any ideas? 
What could I have forgotten?  All my make tests ran just fine, and my
hello world stuff and registry stuff works great.  What am I missing?

<!-- SNIPPETS FROM  httpd.conf -->
################################################################################
## Perl environment handling.
PerlRequire             conf/startup.pl
PerlFreshRestart        On

## HELLO WORLD APP. A full blown module.  Woohoo!
<Location /hello/world>
        SetHandler  perl-script
        PerlHandler Apache::Hello
</Location>

## Turn on Apache::Registry.  This allows for regular cgi's to run under
mod_perl
Alias /perl/ /usr/local/apache/perl/
<Location /perl>
        SetHandler      perl-script
        PerlHandler     Apache::Registry
        PerlSendHeader  On
        Options         +ExecCGI
</Location>

## Turn on perl logging modules
PerlLogHandler Apache::DBILogConfig

Re: PerlLogHandler error messages...

Posted by Cliff Rayman <cl...@genwax.com>.
This error messages means that you did not build mod_perl
with PERL_LOG.  You can build mod_perl with everything
or just add the PerlLogHandler callback.

check out:
http://perl.apache.org/guide/install.html#Callback_Hooks

cliff rayman
genwax.com

Kyle Hodgson wrote:

> archangel/export/home/kyleh/project# apachectl configtest
> Syntax error on line 957 of /usr/local/apache/conf/httpd.conf:
> Invalid command 'PerlLogHandler', perhaps mis-spelled or defined by a
> module not included in the server configuration


Re: PerlLogHandler error messages...

Posted by "G.W. Haywood" <ge...@jubileegroup.co.uk>.
Hi there,

On Sun, 12 Mar 2000, Kyle Hodgson wrote:

> write a simple LogDBI module.  It tells me to install it with 
> PerlLogHandler Apache::LogDBI
> in my httpd.conf.  When I go to restart, I get an error.
> Invalid command 'PerlLogHandler', perhaps mis-spelled or defined by a
> module not included in the server configuration

You haven't got the PerlLogHandler bit compiled in.  You need
EVERYTHING=1 or PERL_LOG=1 when you build mod_perl.  I think you can
run into problems like this if USE_APACI is not mentioned early enough
in your build command or script (or your makepl_args.mod_perl file, if
you are using that).  I have seen the compilation fail to include some
of the handlers even when I have specified EVERYTHING=1.

Here's makepl_args.mod_perl for my mod_perl server:
====================================
USE_APACI=1
APACHE_PREFIX=/usr/local
APACHE_SRC=../apache_1.3.9/src
DO_HTTPD=1
EVERYTHING=1
ALL_HOOKS=1
PERL_SSI=1
PERL_SECTIONS=1
APACI_ARGS=--sbindir=/usr/local/sbin/httpd_perl
APACI_ARGS=--sysconfdir=/usr/local/apache/httpd_perl/conf
APACI_ARGS=--runtimedir=/usr/local/apache/httpd_perl/run
APACI_ARGS=--logfiledir=/usr/local/apache/httpd_perl/logs
APACI_ARGS=--localstatedir=/usr/local/apache/httpd_perl/stat
APACI_ARGS=--proxycachedir=/usr/local/apache/httpd_perl/proxy
APACI_ARGS=--enable-module=rewrite
APACI_ARGS=--enable-module=include
APACI_ARGS=--enable-module=info
====================================

Try something like that, it works for me (Linux 2.0.34, Apache 1.3.9,
mod_perl 1.21) although it grumbles about non-standard installations
because of APACHE_PREFIX.  Obviously you'll need to edit the paths.

Let me know if it fixes it.

73,
Ged.