PHP Variable "_SERVER['REMOTE_ADDR']" = 0.0.0.0

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
Hartleigh
Forum Newbie
Posts: 2
Joined: Wed Jan 24, 2007 7:38 pm

PHP Variable "_SERVER['REMOTE_ADDR']" = 0.0.0.0

Post by Hartleigh »

Hi All,

I normally use IRC to find help on PHP related issues, however with not much luck there I found this community... maybe someone here can shed some light on an issue that has me scratching my head.

I have an intranet running for the company that I work for which has been developed using PHP5. This intranet was originally situated on a Windows 2000 (SP4) machine running IIS, PHP5, and MySQL 5. It was running perfectly as this is the system it was developed on.

I needed to move the intranet because of problems with the RAID array, and have since migrated everything to a different server which is currently running Windows 2000 (SP4), Apache 2.2.4, PHP 5.2.0, and MySQL 5.

Since the move, I have noticed in my error reporting script and in the phpinfo function that the _SERVER['REMOTE_ADDR'] variable returns "0.0.0.0" instead of the client's IP address. I have tested this using several different client machines, checked firewall settings on both server and clients, and also checked the Apache log files. There does not seem to be anything out of place, however people I have spoken to suggest that this is most likely an issue with the Apache server.

Does anyone have any ideas/suggestions where to look next. Any ideas would be greatly appreciated. If further information is needed to assist then feel free to let me know ;)
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Post by dude81 »

Undoubtedly php.ini :P
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

There's a bug entry at http://issues.apache.org/bugzilla/show_bug.cgi?id=41404
is php installed as cgi?
Hartleigh
Forum Newbie
Posts: 2
Joined: Wed Jan 24, 2007 7:38 pm

Post by Hartleigh »

No PHP is installed as a module. REMOTE_PORT's value is 0 for me also though, so looks like it is something related with Apache 2.2.4.

I might consider downgrading to 2.2.3 as another user has done in that bug report, although it's not a requirement that this works... but I certainly wanted to try and fix it.

Thanks for the help ;)
Post Reply