[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: A newbie modperl problem
From:       "Jordan McLain" <jordan.mclain () gmail ! com>
Date:       2006-09-28 13:44:45
Message-ID: 5622edeb0609280644h14646ec9id55c255e049e7b35 () mail ! gmail ! com
[Download RAW message or body]

It seems from your message that Feedback.pm is in /home/apache1.3/fbl/.
Feedback.pm needs to be in /home/apache1.3/fbl/CorpFB/.

Jordan

On 9/28/06, GZ Dark <gzdrk@hotmail.com> wrote:
> At first I'll say sorry that have no experience for writting the modperl
> handler.
> When I wrote a simple handler like:
>
> $ cat CorpFB/Feedback.pm
> package CorpFB::Feedback;
> use Apache::Constants qw(:common);
> use strict;
> use Apache::Request();
>
> sub handler {
>
>     my $r = shift;
>
>     $r->send_http_header('text/html');
>     $r->print("<p>Test");
>
>     return OK;
> }
>
> 1;
>
> The CorpFB/Feedback.pm is under the directory of '/home/apache1.3/cgi'
> which exist in the startup.pl:
>
> $ cat lib/startup.pl
> use strict;
>
> use lib '/home/apache1.3/cgi';
> $ENV{MOD_PERL} or die "not running under mod_perl!";
> ...
> 1;
>
>
> Here are the modperl config pieces in my httpd.conf:
>
> PerlRequire  /home/apache1.3/cgi/lib/startup.pl
> Alias /fbl/ "/home/apache1.3/fbl/"
> PerlModule  CorpFB::Feedback
>
> <Location /fbl>
>     SetHandler perl-script
>     PerlHandler CorpFB::Feedback
> </Location>
>
>
>
> Ok,when I access the url with:
> http://www.xxx.tld/fbl
>
> I got the errors in error_log:
>
> [Thu Sep 28 16:32:53 2006] [error] Undefined subroutine
> &CorpFB::Feedback::handler called.\n
>
>
> Could you help me with it?Thanks.
>
>
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic