Mailing List Archive

Strange problems in mod_perl
This message was sent from Geocrawler.com by "Billow" <billowgy@yahoo.com>
Be sure to reply to that address.

I use cgi-lib.pl in my script.
It works well as a cgi script.
But when I use that script in mod_perl.
I get a strange result:
Sometimes, the script runs well.
But sometimes, it tells me that :
Undefined subroutine &Apache::.....::ReadParse
called at product.pl line 40.

It's really boring.

Even I added:
eval { require "cgi-lib.pl" };
if ($@) {
print "error, load cgi-lib.pl
unsuccessful"; }

I did not get the message. I just get a undefined
subroutin.

Any suggestion?

Geocrawler.com - The Knowledge Archive
Re: Strange problems in mod_perl [ In reply to ]
Your answer was right there in Geocrawler.
Found it by searching for cgi-lib.pl
http://www.geocrawler.com/archives/3/182/1997/7/0/1018603/

cliff rayman
genwax.com

Billow wrote:

> This message was sent from Geocrawler.com by "Billow" <billowgy@yahoo.com>
> Be sure to reply to that address.
>
> I use cgi-lib.pl in my script.
> It works well as a cgi script.
> But when I use that script in mod_perl.
> I get a strange result:
> Sometimes, the script runs well.
> But sometimes, it tells me that :
> Undefined subroutine &Apache::.....::ReadParse
> called at product.pl line 40.
>
> It's really boring.
>
> Even I added:
> eval { require "cgi-lib.pl" };
> if ($@) {
> print "error, load cgi-lib.pl
> unsuccessful"; }
>
> I did not get the message. I just get a undefined
> subroutin.
>
> Any suggestion?
>
> Geocrawler.com - The Knowledge Archive
Re: Strange problems in mod_perl [ In reply to ]
> I use cgi-lib.pl in my script.

I may be mistaken, but I believe I heard on this list that cgi-lib.pl is
not mod_perl compatible. Have you done a search for cgi-lib.pl in an
archive of this list?

Suggested fix: Use apache's API (libareq). Alternatively, there is
CGI.pm, but that's not as efficient.

ELB

--
Eric L. Brine | Chicken: The egg's way of making more eggs.
ELB@iname.com | Do you always hit the nail on the thumb?
ICQ# 4629314 | An optimist thinks thorn bushes have roses.