XF 1.4 Members With Server IP Address

I use OpenShift server.
When setting XenForo, members are displayed as server IP address.
How can I fix it?

Thanks!
Are you using a proxy service? If so, there is a config.php entry that you can make to grab the correct IP.
I used to use CloudFlare and had to use this
Code:
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; }
in config.php and it solved that issue.

Some posts I found using the search term $_SERVER['REMOTE_ADDR turned up this
https://xenforo.com/community/threads/1-guest-online.71115/
https://xenforo.com/community/threads/ip-check-showing-multiple-unrelated-people.73531/#post-761676
https://xenforo.com/community/threads/all-users-have-the-same-ip.74440/
 
Last edited:
In config.php, I added this code and it is very effective
PHP:
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_X_FORWARDED_FOR"];
That indicates that your hosting provider is using a proxy on the front end (could be nginx or varnish or something similar). You may not have known about it if you are on shared hosting, but glad it resolved the problem.
 
Top Bottom