Bug 41404

Summary: script environment "REMOTE_ADDR" and "REMOTE_PORT" return incorrect value
Product: Apache httpd-2 Reporter: Taniya Pirapokin <tpirapokin>
Component: AllAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED FIXED    
Severity: major CC: phreak
Priority: P2    
Version: 2.2.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   

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&#322;a&#380;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