On Tue, 30 Oct 2001, Viljo Marrandi wrote:
> Date: Tue, 30 Oct 2001 17:31:15 +0200
> From: Viljo Marrandi <[EMAIL PROTECTED]>
> To: modperl list <[EMAIL PROTECTED]>
> Subject: CGI.pm problem
>
> Hello,
>
> When I try to make a CGI object in my Apache/mod_perl handler a la $q =
> CGI->new(); The server just don't reply. Actually it works just fine
> until I try to submit a form, then it just hangs and Apache doesn't send
> anything back. If I remove this object creation line, then I can submit
> my form (but then its no use, i can't use the data). What could be the
> problem?
>
> Rgds,
> Viljo
Viljo,
If you're using mod_perl, is there a reason that you don't use the
Apache::Request object for reading form submissions? Instead of
writing "$q = CGI->new()", do this:
sub handler {
my $r = shift;
my $apr = Apache::Request->new( $r->is_main ? $r : $r->main );
my $foo = $apr->param( 'foo' ) || '';
...
return OK;
}
For more information, consult the guide. Perhaps this section would
be useful to you:
http://perl.apache.org/guide/porting.html
ky