You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jie Gao <J....@isu.usyd.edu.au> on 2003/03/26 02:12:22 UTC
get_server_port (was:Re: run_access_check)
On Mon, 24 Mar 2003, Stas Bekman wrote:
> Jie Gao wrote:
> > Hi All,
> >
> > I am getting the following error mesg:
> >
> > Can't locate object method "run_access_checker" via package "Apache::RequestRec" at /usr/local/perl-5.8.0_threaded/lib/site_perl/5.8.0/xxx/.....pm
> >
> > for the section:
> >
> > sub handler {
> > my Apache::Connection $c = shift;
> > my APR::Socket $socket = $c->client_socket;
> > my $r = Apache::RequestRec->new($c);
> > $r->location_merge(__PACKAGE__);
> > my $rc = $r->run_access_checker();
> > ......
> >
> >
> > Any idea why?
> >
> > I am using 2.0.44 with mp2 from cvs.
>
> Guessing that you haven't loaded Apache::HookRun.
>
> % lookup run_access_checker
> to use method 'run_access_checker' add:
> use Apache::HookRun ();
Thanks, that worked.
I have run into another problem, though. I am writing a
PerlProcessConnectionHandler based on the example in "overview of
mod_perl-2.0". It's going to listen on two ports, and I need to know
which port is being used in order to set up other things. But I could
not get get_server_port work.
I have tried:
my $s = $r->server;
my $port = $s->get_server_port;
but got error message:
Can't locate object method "get_server_port" via package "Apache::Server" at /usr/local/perl-5.8.0_threaded/lib/site_perl/5.8.0/xxx.pm
I haven't been able to find relevant documentation.
Regards,
Jie
Re: get_server_port (was:Re: run_access_check)
Posted by Stas Bekman <st...@stason.org>.
Jie Gao wrote:
> I have run into another problem, though. I am writing a
> PerlProcessConnectionHandler based on the example in "overview of
> mod_perl-2.0". It's going to listen on two ports, and I need to know
> which port is being used in order to set up other things. But I could
> not get get_server_port work.
>
> I have tried:
>
> my $s = $r->server;
> my $port = $s->get_server_port;
>
> but got error message:
>
> Can't locate object method "get_server_port" via package "Apache::Server" at /usr/local/perl-5.8.0_threaded/lib/site_perl/5.8.0/xxx.pm
>
> I haven't been able to find relevant documentation.
it's a request method, $r->get_server_port
You probably want: $s->port
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com