You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Sumit Shah <ss...@gce2000.com> on 2006/11/15 02:20:51 UTC

Basic Mod_Perl 1 and Apache 1.3 Issue: Unable to get the requested page.

 
Hello,

I am facing the following issue:

I have installed the following module inside Apache 1.3 using modperl
 1 under Oracle 9i Application Server.
 
 package Apache::Proxy;
 use mod_perl ();
 $VERSION = '1.01';
 
 sub handler{
 
 }
 
 1;
 __END__
 
 
 I have set the following directive/filter setup inside my httpd.conf:
 
 <FilesMatch "\.(cgi|html|htm|jpeg|jpg|jsp)$">
 	       SetHandler  perl-script
 	       PerlHandler Apache::Proxy
 </FilesMatch>
 

If I look at the access_log inside Apache, I get the following:

1) When the filter is setup
38.118.10.237 - - [14/Nov/2006:18:57:17 -0500] "GET
/snflwr_doc_html/asut0002.htm HTTP/1.1" 200 -

2) When I remove the filter (is remove the Perl Module)

38.118.10.237 - - [14/Nov/2006:18:58:17 -0500] "GET
/snflwr_doc_html/asut0002.htm HTTP/1.1" 200 5573 

The difference I see is in the number of bytes transferred from the
server to the client. There are NO bytes transferred in case 1. I would
appreciate if you could provide a solution/comment.

This is the perl module code and is deployed on Windows 2000/Oracle
9iAS/Apache 1.3/Mod_perl 1.  

package Apache::Proxy;

use strict;
use mod_perl 1.17;
use Apache::Constants qw(OK); 

sub handler{
    my $r = shift;
    return OK;
}

1;
__END__



Thanks
Sumit



Re: Basic Mod_Perl 1 and Apache 1.3 Issue: Unable to get the requested page.

Posted by Perrin Harkins <pe...@elem.com>.
Sumit Shah wrote:
> 1) When the filter is setup
> 38.118.10.237 - - [14/Nov/2006:18:57:17 -0500] "GET
> /snflwr_doc_html/asut0002.htm HTTP/1.1" 200 -
> 
> 2) When I remove the filter (is remove the Perl Module)
> 
> 38.118.10.237 - - [14/Nov/2006:18:58:17 -0500] "GET
> /snflwr_doc_html/asut0002.htm HTTP/1.1" 200 5573 
> 
> The difference I see is in the number of bytes transferred from the
> server to the client. There are NO bytes transferred in case 1. I would
> appreciate if you could provide a solution/comment.

What makes you think this is a "filter"?  The PerlHandler is entirely 
responsible for generating all content in the setup you have.  There are 
zero bytes because you didn't send any bytes from your handler.

If what you really want is to apply some kind of filter to outgoing 
files, you should mod_perl 2.  It has a powerful API for writing filters 
that can be applied to outgoing data.

> This is the perl module code and is deployed on Windows 2000/Oracle
> 9iAS/Apache 1.3/Mod_perl 1.

I don't know much about Oracle 9iAS, but running mod_perl 1 on Windows 
is not recommended.  You really should use mod_perl 2 instead.  It has 
much better Windows support.  This is probably the reason why your 
socket code failed in your previous thread, "Mod_perl and HTTP IO issue."

- Perrin