> ...and Embperl runs under mod_perl? Not as CGI? In CGI Mode
> the only chance
> is to print to stderr, which always shows up in the error log. Under
> mod_perl, the timestamp should apear and the message only
> get's logged when
> loglevel is error or below.
>
> If you run under mod_perl, how do you call the page?

Here's the portion of my httpd.conf that deals with Embperl:

# startup.perl loads all functions that we want to use within mod_perl
Perlrequire  /www/www/lib/modperl-startup.pl

SetEnv EMBPERL_LOG /dev/null
# Below environment tells embperl to pass errors through and not complain
# as well as to not chdir on each request
SetEnv EMBPERL_OPTIONS 130
# Below environment tells embperl to log only grievous errors
SetEnv EMBPERL_DEBUG 1
# We could use the below to parse and re-mail errors
SetEnv EMBPERL_MAIL_ERRORS_TO embperl

<FilesMatch ".*\.html$">
SetHandler  perl-script
PerlHandler HTML::Embperl
Options     +ExecCGI
</FilesMatch>


Here's modperl-strartup.pl:

# @(#)  SID: 1.1;  module: modperl-startup.pl;  last changed: 10/19/99
10:30:06use strict;

#modify @INC if needed
use lib qw(/www/www/lib);

# make sure we are in a sane environment.
$ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/ or die "GATEWAY_INTERFACE not Perl!";

# for things in the "/perl" URL
use Apache::Registry;

#load perl modules of your choice here
#this code is interpreted *once* when the server starts
use LWP::UserAgent ();
use HTML::Embperl;

#home-grown html border production
use Borders;

# tell me more about warnings
#use Carp ();
#$SIG{__WARN__} = \&Carp::cluck;

# Load CGI.pm and call its compile() method to precompile
# (but not to import) its autoloaded methods.
#use CGI ();
#CGI->compile(':all');
# Switch to the below when 2.49 is installed
use CGI qw(-compile :all);

1;

Here's a portion of error_log and access_log:

[Tue Oct 19 10:33:46 1999] [notice] Apache/1.3.9 (Unix) mod_perl/1.21
mod_ssl/2.4.2 OpenSSL/0.9.4 configured -- resuming normal operations
[Tue Oct 19 10:33:46 1999] [notice] suEXEC mechanism enabled (wrapper:
/www/www/apache/bin/suexec)
[4834290]ERR:  30: Line 1: Not found /www/www/research/reports/1099.html

bual.research.att.com - - [19/Oct/1999:10:33:50 -0400] "GET /reports/1099.html
HTTP/1.0" 404 335 "-" "Mozilla/4.61 [en] (X11; U; SunOS 5.7 sun4u)"



By the way, even though I "SetEnv EMBPERL_LOG /dev/null", /tmp/embperl.log
still is written to. I had to set that file to be a symlink to /dev/null.

Regards,
Christian

Reply via email to