Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.10.01 - All Issues
Author Message
Jooced
New Member
New Member



Joined: Jun 06, 2007
Posts: 8

PostPosted: Fri Jun 29, 2007 8:40 am Reply with quote

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
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Fri Jun 29, 2007 6:31 pm Reply with quote

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?
 
View user's profile Send private message
Jooced







PostPosted: Fri Jun 29, 2007 9:45 pm Reply with quote

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







PostPosted: Fri Jun 29, 2007 9:52 pm Reply with quote

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







PostPosted: Fri Jun 29, 2007 10:04 pm Reply with quote

IIS - PHP 4.x

BTW - I have no doubt it's my local set up. Smile
 
Raven







PostPosted: Fri Jun 29, 2007 10:24 pm Reply with quote

Seriously and meaning no disrespect Smile - scrap IIS and install Apache.
 
Jooced







PostPosted: Fri Jun 29, 2007 10:27 pm Reply with quote

Hey, what can I say. It's not always the choice of the guy who has to do the work. Smile I appreciate the advice though.
 
Raven







PostPosted: Sat Jun 30, 2007 5:11 am Reply with quote

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







PostPosted: Sat Jun 30, 2007 9:56 am Reply with quote

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







PostPosted: Sat Jun 30, 2007 11:22 am Reply with quote

Typo - Sorry!

Should be else $onlyip=$_SERVER['REMOTE_ADDR'];
 
Jooced







PostPosted: Sat Jun 30, 2007 12:39 pm Reply with quote

Ahh Raven, you're the best!

Works perfect from every place I have to test. Thank you!
 
Raven







PostPosted: Sat Jun 30, 2007 12:44 pm Reply with quote

RavensScripts
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sat Jun 30, 2007 1:34 pm Reply with quote

Raven's the man!

worship

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.10.01 - All Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©