You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Rizwan Majeed <ri...@afapp.net> on 2002/03/20 12:36:23 UTC

handler not being called

Hi..
I have added a handler entry in httpd.conf

<location /myhandler>
  SetHandler perl-script
  PerlHandler Demo
</Location>

and I have printed a string inside the handler thats it.
When I do GET on the URI I get the following error.

<HTML>
<HEAD><TITLE>An Error Occurred</TITLE></HEAD>
<BODY>
<H1>An Error Occurred</h1>
405 Method Not Allowed
</BODY>
</HTML>



Why isnt the handler being called. The module: Demo.pm is placed in more
than one @INC paths of perl.

Waiting for help....


Riz





----- Original Message -----
From: "Francesc Guasch Ortiz" <fr...@etsetb.upc.es>
To: <mo...@perl.apache.org>
Sent: Wednesday, March 20, 2002 1:07 PM
Subject: Re: apache dies silently at start with perl-5.6.1 rpm


> Kurt Hansen escribió:
> >
> > Did you see this message from the Mason list? If so, did this solution
not work
> > for you?
>
> I installed an old Data::Dumper: Data-Dumper-2.101
> Right now I have a compiled perl-5.6.1 and these apache-1.3.22-2 rpm.
>
> Now I can start apache with the mason handler, but as soon
> as I add some DBI module in the handler.pl, it doesn't work:
>
> {  package HTML::Mason::Commands;
>     use DBI;
> }
>
>
> --
> frankie


Re: handler not being called

Posted by Ernest Lergon <er...@virtualitas.net>.
Rizwan Majeed wrote:
> 
> I have added a handler entry in httpd.conf
> 
> <location /myhandler>
>   SetHandler perl-script
>   PerlHandler Demo
> </Location>
> 
> and I have printed a string inside the handler thats it.
> 
Hi Riz,

do you load your Module Demo.pm somewhere?

E.g. in httpd.conf:

	PerlModule Demo

or in startup.pl

	use Demo();

And maybe you have to add butter to the fish ;-) - be more verbose in
your Location definition. See:

http://perl.apache.org/guide/config.html#_Location_Configuration

Ernest


-- 

*********************************************************************
* VIRTUALITAS Inc.               *                                  *
*                                *                                  *
* European Consultant Office     *      http://www.virtualitas.net  *
* Internationales Handelszentrum *   contact:Ernest Lergon          *
* Friedrichstraße 95             *    mailto:Ernest@virtualitas.net *
* 10117 Berlin / Germany         *       ums:+49180528132130266     *
*********************************************************************


Re: handler not being called

Posted by Rizwan Majeed <ri...@afapp.net>.
thank you all for the help.
I missed out this : PerlInitHandler Apache::StatINC
in httpd.conf.
Hence the changes I was making were not alive as the file wasnt reloaded by
mod_perl at every hit.

The thing worked when I added this line!



Riz
----- Original Message -----
From: "Stathy G. Touloumis" <st...@edventions.com>
To: "Rizwan Majeed" <ri...@afapp.net>; <mo...@perl.apache.org>
Sent: Wednesday, March 20, 2002 8:55 PM
Subject: RE: handler not being called


> Can you send the code for Demo.pm?
>
> > I have added a handler entry in httpd.conf
> >
> > <location /myhandler>
> >   SetHandler perl-script
> >   PerlHandler Demo
> > </Location>
> >
> > and I have printed a string inside the handler thats it.
> > When I do GET on the URI I get the following error.
> >
> > <HTML>
> > <HEAD><TITLE>An Error Occurred</TITLE></HEAD>
> > <BODY>
> > <H1>An Error Occurred</h1>
> > 405 Method Not Allowed
> > </BODY>
> > </HTML>
> >
> >
> >
> > Why isnt the handler being called. The module: Demo.pm is placed in more
> > than one @INC paths of perl.
> >
> > Waiting for help....
> >
> >
> > Riz
> >
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "Francesc Guasch Ortiz" <fr...@etsetb.upc.es>
> > To: <mo...@perl.apache.org>
> > Sent: Wednesday, March 20, 2002 1:07 PM
> > Subject: Re: apache dies silently at start with perl-5.6.1 rpm
> >
> >
> > > Kurt Hansen escribió:
> > > >
> > > > Did you see this message from the Mason list? If so, did this
solution
> > not work
> > > > for you?
> > >
> > > I installed an old Data::Dumper: Data-Dumper-2.101
> > > Right now I have a compiled perl-5.6.1 and these apache-1.3.22-2 rpm.
> > >
> > > Now I can start apache with the mason handler, but as soon
> > > as I add some DBI module in the handler.pl, it doesn't work:
> > >
> > > {  package HTML::Mason::Commands;
> > >     use DBI;
> > > }
> > >
> > >
> > > --
> > > frankie
> >


RE: handler not being called

Posted by "Stathy G. Touloumis" <st...@edventions.com>.
Can you send the code for Demo.pm?

> I have added a handler entry in httpd.conf
>
> <location /myhandler>
>   SetHandler perl-script
>   PerlHandler Demo
> </Location>
>
> and I have printed a string inside the handler thats it.
> When I do GET on the URI I get the following error.
>
> <HTML>
> <HEAD><TITLE>An Error Occurred</TITLE></HEAD>
> <BODY>
> <H1>An Error Occurred</h1>
> 405 Method Not Allowed
> </BODY>
> </HTML>
>
>
>
> Why isnt the handler being called. The module: Demo.pm is placed in more
> than one @INC paths of perl.
>
> Waiting for help....
>
>
> Riz
>
>
>
>
>
> ----- Original Message -----
> From: "Francesc Guasch Ortiz" <fr...@etsetb.upc.es>
> To: <mo...@perl.apache.org>
> Sent: Wednesday, March 20, 2002 1:07 PM
> Subject: Re: apache dies silently at start with perl-5.6.1 rpm
>
>
> > Kurt Hansen escribió:
> > >
> > > Did you see this message from the Mason list? If so, did this solution
> not work
> > > for you?
> >
> > I installed an old Data::Dumper: Data-Dumper-2.101
> > Right now I have a compiled perl-5.6.1 and these apache-1.3.22-2 rpm.
> >
> > Now I can start apache with the mason handler, but as soon
> > as I add some DBI module in the handler.pl, it doesn't work:
> >
> > {  package HTML::Mason::Commands;
> >     use DBI;
> > }
> >
> >
> > --
> > frankie
>