Bug 41404 - script environment "REMOTE_ADDR" and "REMOTE_PORT" return incorrect value
script environment "REMOTE_ADDR" and "REMOTE_PORT" return incorrect value
Status: RESOLVED FIXED
Product: Apache httpd-2
Classification: Unclassified
Component: All
2.2.4
PC Windows 2000
: P2 major with 3 votes (vote)
: ---
Assigned To: Apache HTTPD Bugs Mailing List
:
: 41693 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-01-18 13:28 UTC by Taniya Pirapokin
Modified: 2007-12-22 04:27 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Taniya Pirapokin 2007-01-18 13:28:36 UTC
Apache 2.2.4 with default httpd.conf and client request /cgi-bin/printenv.pl 

Get wrong environment value.
.....
REMOTE_ADDR="0.0.0.0"
REMOTE_PORT="0"
.....

I did try fresh install of 2.2.3 and use all default setting. I got the correct
value for those two fields in 2.2.3.
Comment 1 Digdug 2007-01-19 01:48:20 UTC
We have the same problem. 0.0.0.0 for IP adresses, so you can't use allow or 
deny.
The problem did not exist on v2.2.3
Comment 2 peter 2007-01-21 14:21:46 UTC
I have the same problem with 2.0.59. I tried to track it down, and I *think* it
is a problem with either apr or apr-util.

When using 2.0.59 with apr/apr-util 0.9.13 the problem exists. Using
apr/apr-util 0.9.12 with the same httpd version the problem goes away. 

So this might be a problem with apr/apr-util.
Comment 3 Hartleigh 2007-01-24 21:03:16 UTC
Windows 2000 Server (SP4), Apache 2.2.4 and PHP 5.2.0 installed as a module and
i get the exact same problem.

REMOTE_ADDR="0.0.0.0"
REMOTE_PORT="0"

Will consider downgrading to 2.2.3 :|
Comment 4 Bob Ionescu 2007-02-24 05:16:33 UTC
*** Bug 41693 has been marked as a duplicate of this bug. ***
Comment 5 Błażej Karwowski 2007-03-04 12:12:04 UTC
It's same for me. 
(windows 2000 server + XAMPP 1.6.0a)
Comment 6 Michael Fingerhut 2007-03-28 10:00:56 UTC
We are experiencing the same with Apache 2.2.4 and W2K.
Comment 7 Michael Fingerhut 2007-03-30 05:25:26 UTC
This is resolved (pending code changes) by adding the Win32DisableAcceptEx 
directive to the httpd.conf file (see 
http://httpd.apache.org/docs/2.2/mod/mpm_winnt.html)
Comment 8 Michael Fingerhut 2007-03-30 05:26:45 UTC
(In reply to comment #7)
> This is resolved (pending code changes) by adding the Win32DisableAcceptEx 
> directive to the httpd.conf file (see 
> http://httpd.apache.org/docs/2.2/mod/mpm_winnt.html)

Thanks to Bill Rowe for having mentioned this.

Comment 9 Erwin Dokter 2007-03-30 06:59:42 UTC
(In reply to comment #7)
> This is resolved (pending code changes) by adding the Win32DisableAcceptEx 
> directive to the httpd.conf file (see 
> http://httpd.apache.org/docs/2.2/mod/mpm_winnt.html)

While this may solve the environment issue, using Win32DisableAcceptEx 
introduces a (known) huge memory leak. So this is not an acceptable workaround. 
I have downgraden to 2.2.3 for the time being.
Comment 10 Xin 2007-04-15 14:02:24 UTC
All client IPs in the log files (access.log, error.log) are "0.0.0.".
Comment 11 William A. Rowe Jr. 2007-12-21 21:58:29 UTC
This was solved after 2.2.4 for windows 2000