On 17/01/07, Randy Kobes <[EMAIL PROTECTED]> wrote:
On Tue, 16 Jan 2007, [EMAIL PROTECTED] wrote:
> Hi folks,
>
> Not sure whether this issue has been resolved earlier, but did my bit
> searching on the list and googled - couldn't find any standard solutions
> working for me. And apologies for the long mail.
>
> I am upgrading our servers to mod_perl 2.0.2 and Apache 2.0.59 (compiled from
> source)
>
> We get the following errors for a few of our perl cgi scripts
>
> Usage: Apache2::Cookie->fetch($r): missing argument $r: attempt to fetch
> global Apache2::RequestUtil->request failed: Can't locate object method
> "request" via package "Apache2::RequestUtil" at
> /opt/apache-2.0.59/3plib/lib/perl5/site_perl/5.8.8/i686-linux/Apache2/Coo
> kie.pm line 32.
> .
Are you passing $r into fetch()? eg,
my %cookies = Apache2::Cookie->fetch($r);
I'd guess this is the issue, since according to the docs Apache1 is
my $cookies = Apache::Cookie->fetch;
Apache2 is
my $cookies = Apache2::Cookie->fetch($r);
my %cookies = Apache2::Cookie->fetch($r);
and the error is thrown only when $r is not defined.
> I have tried adding
> ---------------------------
> use Apache2;
> use Apache2::compat;
> ---------------------------
> in the startup.pl file but Apache can't find Apache2.pm and hence wouldn't
> start. If I just add in the Apache2::compat, it still shows the same above
> errors.
Apache2.pm is no longer present in mod_perl; see
http://perl.apache.org/docs/2.0/rename.html
--
best regards,
Randy Kobes
--
Website: http://philw.co.uk
Skype: philwhelan76
Email : [EMAIL PROTECTED]
MSN Messenger : [EMAIL PROTECTED]
iChat: [EMAIL PROTECTED]