perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Schindl <lis...@bestsolution.at>
Subject Re: MOD_PERL - Apache2 configuration issue
Date Tue, 12 Sep 2006 15:55:17 GMT
Sumit Shah schrieb:
> Hello,
> 
> I have created a very simple perl module (MyApache2::NewMod) using h2xs
> and installed it inside /usr/lib/Perl5.
> 
> Following is the source:
> 
> #file MyApache2/NewMod
> package MyApache2::NewMod;
> 
> use strict;
> use warnings;
> 
> sub handler {
> 
>        #Open a file for writing
>        open(FH, "> test.txt")  or die $!;
>        print FH "Hello World !!!\n";
> 
> }
> 
> 1;
> __END__
> 
> If you see all its doing is opening a new file and writing 'Hello World
> !!!'. I have included inside Apache2 (global section in httpd.conf) as
> follows:
> 
> PerlModule MyApache2::NewMod
> PerlPostReadRequestHandler MyApache2::NewMod
> 
> When I bounce Apache and hit the server, it does create the file
> (test.txt) but does NOT write to that file. I would appreciate if you
> could tell me what I am doing wrong.
> 
> Thanks
> Sumit

I think you need to put your configure lines into a <directory>,
<location> or <file>-section.

Tom

Mime
View raw message