View Single Post
  #41  
Old 06-08-2007, 12:13 PM
  shopccp's Avatar 
shopccp shopccp is offline
 

Advanced Member
  
Join Date: Oct 2006
Posts: 35
 

Default Re: IP Addresses in Users Online for all users

Your mod does not work on my site either. I configured all three files...no ip in users online. I'm using xcart 4.1.7.

This mod now works on my site. After I posted the above message, refresh all browser and ftp content...minutes later the ip address shows up in users online. I noticed my ip address is not listed in user online stats when I'm connected to the homepage. Its a little wierd, but at least other ip addresses shows up.


Justin

Quote:
Originally Posted by hamid
Hi 2019

It's a shame that it's not working for you - but if you have followed the instructions above and you are running 4.0.14 (although it probably works on any 4.0.x), then I really don't know why it's not working without seeing your code.

This was the first mod I've posted, so to be honest I dont know if it works on anyone elses system. It works on mine, so in theory it should work with others too.

I'm not an expert, but in order to try to make it work you could try the following:

1. Some servers have a problem with the 'getenv' function, so in my modification of auth.php, change

$session_ip = getenv('REMOTE_ADDR');

to:

$session_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];

Then upload the ammended file and see if the IP addresses appear in your Users Online page.

To be honest, I think it's generally accepted that it's better practice to use $HTTP_SERVER_VARS rather than getenv anyway

If anyone else has tried this mod... did it work?
__________________
X-Cart Gold v4.4.4
Apache v2.2.20
PHP v5.3.8
MySQL v5.1.56-log
Linux kernel v2.6.18-238.19.1.el5xen
Reply With Quote