Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

mod_perl conf test

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


sandhya.pawar03 at gmail

Apr 8, 2009, 8:05 PM

Post #1 of 7 (1542 views)
Permalink
mod_perl conf test

I installed and configured mod_perl2.0004 successfully.
To test that, I wrote one Hello.pm prg as per document and saved it
C:\Perl\site\lib\Apache2\

package Apache2::Hello;
use strict;

use Apache2::RequestRec (); # for $r->content_type
use Apache2::RequestIO (); # for $r->puts
use Apache2::Const -compile => ':common';

sub handler {
my $r = shift;
my $time = scalar localtime();
my $package = __PACKAGE__;
$r->content_type('text/html');
$r->puts(<<"END");
<HTML><BODY>
<H3>Hello</H3>
Hello from <B>$package</B>! The time is $time.
</BODY></HTML>
END
return Apache2::Const::OK;
}

1;

and put the following lines in C:\Program Files\Apache Software
Foundation\Apache2.2\conf\httpd.conf

PerlModule Apache2::Hello
<Location /hello>
SetHandler modperl
PerlResponseHandler Apache2::Hello
</Location>



but http://localhost/hellp It gives HTTP 404 Not Found error.


soules at gmail

Apr 8, 2009, 9:42 PM

Post #2 of 7 (1470 views)
Permalink
Re: mod_perl conf test [In reply to]

> and put the following lines in C:\Program Files\Apache Software
> Foundation\Apache2.2\conf\httpd.conf
>
> PerlModule Apache2::Hello
> <Location /hello>
> SetHandler modperl
> PerlResponseHandler Apache2::Hello
> </Location>
>
>
>
> but http://localhost/hellp It gives HTTP 404 Not Found error.

Just to take care of the obvious here -- you pointed the browser to
hellp, not hello? Or is that just a typo in your email?


sandhya.pawar03 at gmail

Apr 9, 2009, 12:53 AM

Post #3 of 7 (1463 views)
Permalink
Re: mod_perl conf test [In reply to]

It is the typo in my email..



On Thu, Apr 9, 2009 at 10:12 AM, Jeff Soules <soules [at] gmail> wrote:

> > and put the following lines in C:\Program Files\Apache Software
> > Foundation\Apache2.2\conf\httpd.conf
> >
> > PerlModule Apache2::Hello
> > <Location /hello>
> > SetHandler modperl
> > PerlResponseHandler Apache2::Hello
> > </Location>
> >
> >
> >
> > but http://localhost/hellp It gives HTTP 404 Not Found error.
>
> Just to take care of the obvious here -- you pointed the browser to
> hellp, not hello? Or is that just a typo in your email?
>


randy.kobes at gmail

Apr 10, 2009, 10:27 AM

Post #4 of 7 (1450 views)
Permalink
Re: mod_perl conf test [In reply to]

On Thu, Apr 9, 2009 at 2:53 AM, sandhya pawar <sandhya.pawar03 [at] gmail> wrote:

> On Thu, Apr 9, 2009 at 10:12 AM, Jeff Soules <soules [at] gmail> wrote:
>>
>> > and put the following lines in C:\Program Files\Apache Software
>> > Foundation\Apache2.2\conf\httpd.conf
>> >
>> > PerlModule Apache2::Hello
>> >   <Location /hello>
>> >     SetHandler modperl
>> >     PerlResponseHandler Apache2::Hello
>> >   </Location>
>> >
>> > but http://localhost/hellp It gives HTTP 404 Not Found error.
>>
>> Just to take care of the obvious here -- you pointed the browser to
>> hellp, not hello?  Or is that just a typo in your email?
>
> It is the typo in my email..

One other small thing to check - does clearing the browser's cache
help? Also, do other static pages work OK?

--
best regards,
Randy


sandhya.pawar03 at gmail

Apr 13, 2009, 9:57 AM

Post #5 of 7 (1407 views)
Permalink
Re: mod_perl conf test [In reply to]

File does not exist: C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/hello.pm
It gives the above error?




On Fri, Apr 10, 2009 at 10:57 PM, Randy Kobes <randy.kobes [at] gmail> wrote:

> On Thu, Apr 9, 2009 at 2:53 AM, sandhya pawar <sandhya.pawar03 [at] gmail>
> wrote:
>
> > On Thu, Apr 9, 2009 at 10:12 AM, Jeff Soules <soules [at] gmail> wrote:
> >>
> >> > and put the following lines in C:\Program Files\Apache Software
> >> > Foundation\Apache2.2\conf\httpd.conf
> >> >
> >> > PerlModule Apache2::Hello
> >> > <Location /hello>
> >> > SetHandler modperl
> >> > PerlResponseHandler Apache2::Hello
> >> > </Location>
> >> >
> >> > but http://localhost/hellp It gives HTTP 404 Not Found error.
> >>
> >> Just to take care of the obvious here -- you pointed the browser to
> >> hellp, not hello? Or is that just a typo in your email?
> >
> > It is the typo in my email..
>
> One other small thing to check - does clearing the browser's cache
> help? Also, do other static pages work OK?
>
> --
> best regards,
> Randy
>


randy.kobes at gmail

Apr 13, 2009, 10:03 AM

Post #6 of 7 (1410 views)
Permalink
Re: mod_perl conf test [In reply to]

On Mon, Apr 13, 2009 at 11:57 AM, sandhya pawar
<sandhya.pawar03 [at] gmail> wrote:
> File does not exist: C:/Program Files/Apache Software
> Foundation/Apache2.2/htdocs/hello.pm
> It gives the above error?

Hello.pm (containing Apache2::Hello) should be placed within your Perl
directory (eg, C:\Perl\site\lib\Apache2\Hello.pm, if your top-level
Perl directory is C:\Perl).

--
best regards,
Randy


sandhya.pawar03 at gmail

Apr 13, 2009, 10:28 PM

Post #7 of 7 (1409 views)
Permalink
Re: mod_perl conf test [In reply to]

I have placed that files in C:\Perl\site\lib\Apache2\Hello.pm
but still it gives the error..

On Mon, Apr 13, 2009 at 10:33 PM, Randy Kobes <randy.kobes [at] gmail> wrote:

> On Mon, Apr 13, 2009 at 11:57 AM, sandhya pawar
> <sandhya.pawar03 [at] gmail> wrote:
> > File does not exist: C:/Program Files/Apache Software
> > Foundation/Apache2.2/htdocs/hello.pm
> > It gives the above error?
>
> Hello.pm (containing Apache2::Hello) should be placed within your Perl
> directory (eg, C:\Perl\site\lib\Apache2\Hello.pm, if your top-level
> Perl directory is C:\Perl).
>
> --
> best regards,
> Randy
>

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.