Re: Problem with Apache2::Connection::remote_ip

Steve Hay <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <CADED=K5qEPo7A0qPAO1hqQQM8QwvhNMnYepPOmbkBPZsyJY35A@mail.gmail.com>
On 9 February 2014 05:49, Steve Baldwin <[email protected]> wrote:
> Hi,
>
> Not sure what I'm doing wrong here. I'm just trying to get the client ip
> address in a PerlResponseHandler as follows:
>
> :
> use Apache2::Connection;
> :
>     my $remote_ip = $r->connection->remote_ip();
> :
>
> I get a runtime error as follows:
>
> [Sun Feb 09 16:44:22.499681 2014] [perl:error] [pid 3632] [client
> 192.168.1.105:52533] Can't locate object method "remote_ip" via package
> "Apache2::Connection" at /usr/local/lib/site_perl/Storm/Dev/Handler.pm

Is it called client_ip() now rather than remote_ip()?


>
> Here are the various versions (OS = Ubuntu 13.10) :
>
> [Sun Feb 09 16:44:01.267265 2014] [mpm_prefork:notice] [pid 3625] AH00163:
> Apache/2.4.6 (Ubuntu) PHP/5.5.3-1ubuntu2.1 mod_perl/2.0.8 Perl/v5.14.2
> configured -- resuming normal operations

mod_perl doesn't officially support httpd 2.4.x yet, but it's getting
close now. I think some Linux distros have gone ahead with versions
already, which I guess is what you're using.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.