Author |
Message |
Jooced
New Member


Joined: Jun 06, 2007
Posts: 8
|
Posted:
Fri Jun 29, 2007 8:40 am |
|
Hi all, I have a pretty basic install of 2.10.01 but the only issue I have is with the User Info block 2.2.2. The first item in the block is "Your IP:" and that is always blank. Everything else from the avatar to the users is working great.
Any ideas where I can start to look? I get no errors on the page when enabling error reporting.
Thank you |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Fri Jun 29, 2007 6:31 pm |
|
This is the logic that is used to determine your ip.
Code:if (getenv('HTTP_X_FORWARDED_FOR')) {
$onlyip=getenv('HTTP_X_FORWARDED_FOR');
}
else $onlyip=getenv('REMOTE_ADDR');
|
It would seem that your ip is not getting populated in your environment variables. What OS are you using? |
|
|
|
 |
Jooced

|
Posted:
Fri Jun 29, 2007 9:45 pm |
|
I'm using Vista. IE 7 and Firefox both. Also happens with XP.
The IP tacking tables see my IP (if that matters) just fine.
Thanks for the quick reply Raven. |
|
|
|
 |
Raven

|
Posted:
Fri Jun 29, 2007 9:52 pm |
|
The browser isn't important. The O/S is XP. I test on XP and Linux and it works under both. So, it would appear to be something with your local setup. Are you using Apache or IIS? |
|
|
|
 |
Jooced

|
Posted:
Fri Jun 29, 2007 10:04 pm |
|
IIS - PHP 4.x
BTW - I have no doubt it's my local set up.  |
|
|
|
 |
Raven

|
Posted:
Fri Jun 29, 2007 10:24 pm |
|
Seriously and meaning no disrespect - scrap IIS and install Apache. |
|
|
|
 |
Jooced

|
Posted:
Fri Jun 29, 2007 10:27 pm |
|
Hey, what can I say. It's not always the choice of the guy who has to do the work. I appreciate the advice though. |
|
|
|
 |
Raven

|
Posted:
Sat Jun 30, 2007 5:11 am |
|
Try this
Code:
if (getenv('HTTP_X_FORWARDED_FOR')) {
$onlyip=getenv('HTTP_X_FORWARDED_FOR');
}
else $onlyip=$_SERVER['REMOTE_ADDR'];
|
|
Last edited by Raven on Sat Jun 30, 2007 11:20 am; edited 1 time in total |
|
|
 |
Jooced

|
Posted:
Sat Jun 30, 2007 9:56 am |
|
Actually that ends up screwing up the layout of the site, weird. All I see is the header/logo up top then lines lines down the left side. Sorry that's rather descriptive and I can't give out a link to show either at this time. |
|
|
|
 |
Raven

|
Posted:
Sat Jun 30, 2007 11:22 am |
|
Typo - Sorry!
Should be else $onlyip=$_SERVER['REMOTE_ADDR']; |
|
|
|
 |
Jooced

|
Posted:
Sat Jun 30, 2007 12:39 pm |
|
Ahh Raven, you're the best!
Works perfect from every place I have to test. Thank you! |
|
|
|
 |
Raven

|
Posted:
Sat Jun 30, 2007 12:44 pm |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sat Jun 30, 2007 1:34 pm |
|
Raven's the man!
 |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
|