Most recent IP address of members shows server IP

Started by Tonyvic, June 17, 2015, 11:38:38 AM

Previous topic - Next topic

Tonyvic

Many thanks margarett and Illori I take it there is no updated code or fix for this issue?

margarett

The code is correct... There is a proxy in the way so it stores its IP.
We can change the code slightly so that it doesn't store the second IP...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Tonyvic

That would be great, but I'm also concerned about the browser problem
QuoteAfter reading new posts the 'new' icon remains, the only way to clear it is an F5 refresh or logout and back in.
It was also reported:
QuoteI was logged in (using IE) earlier this morning and the problem was still there (read posts still showing as unread); I logged out and have come back in again after just over an hour. I noticed initially the same thing but then, after reading the odd post, I noticed the clock time (in the top right corner by my avatar) was still showing the time that I was logged in earlier. I refreshed the screen and the clock time corrected itself and the read posts then disappeared.

If that type of thing is also a result of nginx and varnish being added to the server, maybe I should simply transfer my domain to another server.

margarett

Yes.

That kind of cache serves you "old" page views until the cache expires. It's really a bad idea to have that for dynamic content like a PHP script...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Tonyvic

Thanks for that margarett, that  helps me to understand it more. All I need to do now is decide whether I should change servers. :-\

Illori

maybe time to look into changing hosts... your host should have told you about the changes before they were made, this way you could have changed servers before if you had wanted.

Tonyvic

Quote from: Illori on June 22, 2015, 06:04:29 AM
maybe time to look into changing hosts... your host should have told you about the changes before they were made, this way you could have changed servers before if you had wanted.
Illori, You are probably correct, especially as the first response when I asked if they had changed/added anything on the server was:
QuoteWe have not make any changes under your hosting account or on our server end. We do not edit our clients data without his prior permission. May be it is due to theme so we will request you to please check the same with your web developer.
But then the same thing could happen with a different host. I am about to 'do battle' with them regarding this, who knows I might be offered Fully Managed VPS Hosting for the same price as my shared package for my inconvenience. :) 

margarett

I wouldn't count on that :P

Do note that it IS possible to use cache without these issues. It's just necessary to configure it properly. Varnish and CloudFlare are very widespread (although they are not the same thing) and used in many many sites. It seems to me that they are caching database content and that cannot happen in a forum...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Tonyvic

QuoteI wouldn't count on that :P
Well, I can dream. lol

QuoteDo note that it IS possible to use cache without these issues. It's just necessary to configure it properly.
Possible maybe, but I doubt my host could. :'(

sumocomputers

Looks like I have the same problem with my host confirmed by using the ipclient.php script.

And the host (A Small Orange) confirmed that all their shared hosting like my site uses a reverse proxy, but couldn't (or wouldn't) tell me if this had been turned on recently.  We only saw this issue with users logged in within the last 48 hours.

I know caching is bad, but for the moment I am stuck with this until I can find another plan or host.

I read through all the posts in this topic, but didn't see which core php file I would need to modify in order to solve the issue.  Or is it solvable this way?

Thanks,

Chris

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

DSystem

@sumocomputers, Easy to solve.

Change all the REMOTE_ADDR by HTTP_X_REAL_IP found in the script from the forum.

Changed files:
/SSI.php
/Sources/Load.php
/Sources/ManageSearchEngines.php
/Sources/QueryString.php

Kindred

not sure that would fix the issue with the HOST-SIDE proxy...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

sumocomputers

Made the changes, and so far with limited testing, it seems to be showing up correctly now...

Found this old 2012 thread, and looks like it is supposed to be in 2.1, but that could be months away for a production release.
http://www.simplemachines.org/community/index.php?topic=151317.0

Thank You,

Chris

Advertisement: