Octopussy-Project / Octopussy

Octopussy - Open Source Log Management Solution
https://octopussy.pm
GNU General Public License v3.0
154 stars 28 forks source link

remote_ip renamed in Apache 2.4 #604

Closed djzort closed 7 years ago

djzort commented 10 years ago

heres the error i get

[Fri Sep 12 15:31:05.745405 2014] [perl:error] [pid 11369] [client 172.29.0.13:36037] Can't locate object method "remote_ip" via package "Apache2::Connection" at /usr/share/perl5/Apache/ASP/StateManager.pm line 85.\n at /usr/share/perl5/Apache/ASP/StateManager.pm line 85.\n\tApache::ASP::InitState(Apache::ASP=HASH(0x7ffee2c8c030)) called at /usr/share/perl5/Apache/ASP.pm line 421\n\tApache::ASP::new("Apache::ASP", Apache2::RequestRec=SCALAR(0x7ffee2a52ef0), "/usr/share/octopussy/index.asp") called at /usr/share/perl5/Apache/ASP.pm line 184\n\tApache::ASP::handler(Apache2::RequestRec=SCALAR(0x7ffee2a52ef0)) called at -e line 0\n\teval {...} called at -e line 0\n

See http://www.marshut.com/ippzhs/problem-with-apache2-connection-remote-ip.html and http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html (search for "remote_ip").

conn_rec->remote_ip and conn_rec->remote_addr These fields have been renamed in order to distinguish between the client IP address of the connection and the useragent IP address of the request (potentially overridden by a load balancer or proxy). References to either of these fields must be updated with one of the following options, as appropriate for the module:

When you require the IP address of the user agent, which might be connected directly to the server, or might optionally be separated from the server by a transparent load balancer or proxy, use request_rec->useragent_ip and request_rec->useragent_addr.
When you require the IP address of the client that is connected directly to the server, which might be the useragent or might be the load balancer or proxy itself, use conn_rec->client_ip and conn_rec->client_addr.
sebthebert commented 10 years ago

Hello,

well, it's a major issue that I can't really fix... :(

Apache::ASP Perl web framework uses Apache2::Connection module from mod_perl which doesn't support Apache 2.4 yet...

I was thinking about migrating Octopussy from Apache::ASP to Mojolicious or Dancer since months, I guess it's time to really think about it...

bcoca commented 10 years ago

I changed the module manually, but this is not really an octopussy issue, some distros have apache2 perl modules that are still using the old but installed with others using the new.​

I opend a bug with my distro, I recommend you do the same.

djzort commented 10 years ago

Most likely this will require Apache::ASP to be awair of the changes

djzort commented 7 years ago

the Apache::ASP bug -> https://rt.cpan.org/Public/Bug/Display.html?id=107118

sebthebert commented 7 years ago

The latest release 1.0.16 fixed that issue.

commit https://github.com/sebthebert/Octopussy/commit/287342bd8a5a9388d2450a2380e6c2bbe2db5440