<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">David,<br>
<br>
See
<a class="moz-txt-link-freetext" href="http://www.marshut.com/ippzhs/problem-with-apache2-connection-remote-ip.html">http://www.marshut.com/ippzhs/problem-with-apache2-connection-remote-ip.html</a>
and <a class="moz-txt-link-freetext" href="http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html">http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html</a>
(search for "remote_ip").<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<dt style="line-height: 1.3em; margin-top: 0.5em; font-weight:
bold; color: rgb(0, 51, 102); font-family: Arial, Helvetica,
sans-serif; font-size: 14px; font-style: normal; font-variant:
normal; letter-spacing: normal; orphans: auto; text-align:
start; text-indent: 0px; text-transform: none; white-space:
normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255);"><code style="font-family: 'Courier New', Courier,
monospace; font-size: 1em;">conn_rec->remote_ip</code><span
class="Apple-converted-space"> </span>and<span
class="Apple-converted-space"> </span><code
style="font-family: 'Courier New', Courier, monospace;
font-size: 1em;">conn_rec->remote_addr</code></dt>
<dd style="line-height: 1.3em; color: rgb(0, 51, 102);
font-family: Arial, Helvetica, sans-serif; font-size: 14px;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255);">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:
<ul style="margin-bottom: 1em; list-style-type: disc;">
<li style="line-height: 1.3em;">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<span
class="Apple-converted-space"> </span><code
style="font-family: 'Courier New', Courier, monospace;
font-size: 1em;">request_rec->useragent_ip</code><span
class="Apple-converted-space"> </span>and<span
class="Apple-converted-space"> </span><code
style="font-family: 'Courier New', Courier, monospace;
font-size: 1em;">request_rec->useragent_addr</code>.</li>
<li style="line-height: 1.3em;">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<span
class="Apple-converted-space"> </span><code
style="font-family: 'Courier New', Courier, monospace;
font-size: 1em;">conn_rec->client_ip</code><span
class="Apple-converted-space"> </span>and<span
class="Apple-converted-space"> </span><code
style="font-family: 'Courier New', Courier, monospace;
font-size: 1em;">conn_rec->client_addr</code>.</li>
</ul>
</dd>
<br>
It seems like it should use useragent_ip now. But we need to
support either versions of apache2/mod_perl so will have to test
for remote_ip's existence then useragent_ip.<br>
<br>
I've now created that ticket:
<a class="moz-txt-link-freetext" href="https://github.com/eprints/eprints/issues/214">https://github.com/eprints/eprints/issues/214</a> & thanks for
reporting that issue.<br>
<br>
Seb.<br>
<br>
On 12/03/14 11:24, David McElroy wrote:<br>
</div>
<blockquote
cite="mid:D078C9070865754097A6F329D2295B261E79D194@DL-EXMB2.uel.ac.uk"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>Just finished setting up Eprints in ubuntu 13.10 server
and I was getting the following error in my apache log:</div>
<div> </div>
<div style="text-indent:36pt;"><font face="Consolas" size="2"><span
style="font-size:9pt;">Can't locate object method
"remote_ip" via package "Apache2::Connection" at
/usr/share/eprints3/perl_lib/EPrints/DataObj/LoginTicket.pm
line 143.\n</span></font></div>
<div> </div>
<div>this corrected the issue:</div>
<div> </div>
<div><font face="Consolas" size="2"><span
style="font-size:9pt;"> #my $ip =
$r->connection->remote_ip;</span></font></div>
<div style="text-indent:36pt;"><font face="Consolas" size="2"><span
style="font-size:9pt;">my $ip =
$r->connection->client_ip;</span></font></div>
<div> </div>
<div>and on line 118:</div>
<div> </div>
<div style="text-indent:36pt;"><font face="Consolas" size="2"><span
style="font-size:9pt;">#$data->{ip} =
$repo->get_request->connection->remote_ip;
</span></font></div>
<div style="text-indent:36pt;"><font face="Consolas" size="2"><span
style="font-size:9pt;">$data->{ip} =
$repo->get_request->connection->client_ip;</span></font></div>
<div> </div>
<div> </div>
<div>I can’t see this issue on the github, should I submit it?
Or am I correcting something that I should be fixing in my
perl modules? </div>
<div><br>
Thanks,</div>
<div> </div>
<div><b>David McElroy</b></div>
<div><font size="2"><span style="font-size:10pt;"><b>Research
Data Management Officer</b></span></font></div>
<div><font size="2"><span style="font-size:10pt;"> </span></font></div>
<div><font size="2"><span style="font-size:10pt;"><b>University
of East London</b></span></font></div>
<div><font color="#262626" size="2"><span
style="font-size:10pt;"><b>Docklands Library</b></span></font></div>
<div><font color="#262626" size="2"><span
style="font-size:10pt;"><b>University Way</b></span></font></div>
<div><font color="#262626" size="2"><span
style="font-size:10pt;"><b>London E16 2RD</b></span></font></div>
<div> </div>
<div><font size="2"><span style="font-size:10pt;"><b>t: 020
8223 6467</b></span></font></div>
<div><font color="#505050"><br>
</font></div>
<div> </div>
<div> </div>
<div> </div>
</span></font>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
</blockquote>
<br>
</body>
</html>