Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

[SOLVED] Rackspace Sites - All IP addresses are the same - As of version 1.3.2.4
 
davedavedave
Sr. Member
 
Avatar
Total Posts:  238
Joined:  2007-08-31
 

I wanted to create this thread to have a solution for anybody using Rackspace Sites where they have the problem of all of the IP addresses showing the same numbers.  You can work around this by doing the following:

Here is the updated fix as of version 1.3.2.4 as the fix listed originally no longer applied.  The following issue occurs on Rackspace Cloud Sites (formerly known as Mosso).

The file needed to be modified is in /app/code/core/Mage/Core/Helper/Http.php

Instead of editing a core file, you should create a new file in the local version.  So copy the Http.php file above and put it here (you’ll probably have to create the directories):

/app/code/local/Mage/Core/Helper/Http.php

On line 141 you will see this:

$this->_remoteAddr $this->_getRequest()->getServer('REMOTE_ADDR');

If you are using SSL on your store, replace with this:

$this->_remoteAddr $this->_getRequest()->getServer('HTTP_X_FORWARDED_FOR');

If you are not using SSL on your store, replace with this:

$this->_remoteAddr $this->_getRequest()->getServer('HTTP_X_CLUSTER_CLIENT_IP');

Now your customers IP address should show on orders as well as “online customers”.

The variables that replaced REMOTE_ADDR were obtained from the Rackspace Wiki:

http://cloudsites.rackspacecloud.com/index.php/Why_does_every_visitor_to_my_website_have_the_same_IP_address

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top