Hi,

We changed the code as you had given. Still we get the same message.

Lots of others have told us that we can only run it under mod_perl. Fine. We
realise this. When we run it under mod_perl we got this message in Apache
error log. Hence we ran it under perl.

We feel that there is some basic thing we are missing out. It seems as if
when perl tries to link up to Apache.pm it is not able to recognize the the
method "request". We are using Apache 1.3.6, perl ver 5.0005 and mod_perl
version 1.21
Is there a problem with these versions.
Should we enable anything while compiling in mod_perl

Thanks for any help.

Muthu Ganesh

ps. I'm sorry if we have offended anybody. It's not our intention to cook up
syntax !! We are making sincere attempts to understand why something is not
working. If somebody feels that these questions are below their level, then
please ignore the same.

----- Original Message -----
From: Ken Williams <[EMAIL PROTECTED]>
To: Differentiated Software Solutions Pvt. Ltd <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, September 05, 2000 8:01 PM
Subject: Re: internal_redirect


> [EMAIL PROTECTED] (Differentiated Software Solutions Pvt. Ltd) wrote:
> >We corrected R to r. Problem still remains.
> >We ran this program as a standalone perl program and even this bombs.
Code
> >as follows.
> >
> >#!/usr/bin/perl
> >my $r;
> >use Apache ();
> >
> >Apache->request($r);
> >
> >$r->internal_redirect('hello.html');
> >
> >Error message : Can't locate object method "request" via package "Apache"
at
> >../test1.pl line 5.
>
>
> As others have mentioned, you can't run this code standalone without
> using some tricks (though they're not very tricky).  But you've got a
> different problem.  According to your code, $r is never assigned to, so
> it should fail with a different error than you're seeing anyway.  You
> want something like this:
>
>    #!/usr/bin/perl
>    use Apache ();
>
>    my $r = Apache->request;
>
>    $r->internal_redirect('/path/to/hello.html');
>
>
>   -------------------                            -------------------
>   Ken Williams                             Last Bastion of Euclidity
>   [EMAIL PROTECTED]                            The Math Forum
>

Reply via email to