You will be warned for your question format.
There seems 2 problems, one is about error log and anothoer is about here document like printing. At first, your program prints anything or not? If you pickup troubled lines into sample script, I can know your $r->print() prints anything or not... at least in my environment.
I can print $r->print with configuration like this.
#mod_perl test
LoadModule perl_module /usr/local/libexec/apache22/mod_perl.so
#there should be better way than this...
<Perl>
unshift @INC, '/usr/local/www/apache22/cgi-bin/test-modperl';
</Perl>
PerlModule test1::sample
<Directory /usr/local/www/apache22/cgi-bin/test-modperl/test1>
SetHandler perl-script
PerlHandler test1::sample
</Directory>
And $r->print in test1/sample.pm prints my text. I'm on FreeBSD 8.2, mod_perl2.0.5 .
package test1::sample;
use strict;
use warnings;
#old use Apache::Constants qw(OK);
use Apache2::Const qw(OK);
use Apache2::RequestRec();
use Apache2::RequestIO();
sub handler {
my $r=shift;
#old $r->send_http_header("text/plain");
$r->content_type("text/plain");
my $a=<<EOS
test
test
test
EOS
;
$r->print($a);
return OK;
}
1;
good luck for you. regards.
|