kickstart Posted July 29, 2010 Share Posted July 29, 2010 Hi I have a couple of phpbb forums on my web space. One is randomly throwing people off and it is getting far worse. I have traced down the issue to the IP address. Phpbb stores the IP address and session id and checks that they match. If not it throws the user out. The session ids seem to be there OK, but the IP addresses aren't. When it causes a problem the IP address seems to be returned as "::" (yes, 2 colons). I have used the following routine to try and obtain a relevant IP address and it to returns "::" function getRealIpAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet { $ip=$_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy { $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip=$_SERVER['REMOTE_ADDR']; } return $ip; } Any ideas? All the best Keith Quote Link to comment Share on other sites More sharing options...
trq Posted July 29, 2010 Share Posted July 29, 2010 I would suggest that these clients returning :: are using ipv6 instead of the more traditional ipv4. My advice would be to report this as a bug to phpBB. Quote Link to comment Share on other sites More sharing options...
kickstart Posted July 30, 2010 Author Share Posted July 30, 2010 I would suggest that these clients returning :: are using ipv6 instead of the more traditional ipv4. My advice would be to report this as a bug to phpBB. IPv6 is my guess as well, but surely that should be returned in the server variables. I don't care too much what it is as long as it is consistent. Unfortunately it is an old phpBB2 board so no longer supported. All the best Keith Quote Link to comment Share on other sites More sharing options...
kickstart Posted July 30, 2010 Author Share Posted July 30, 2010 Hi I have done a small mod to log the IP address of every visit. Looking at that there is no pattern. If I visit a dozen times in a row, I might land up with 2/3 being recorded as "::" and 1/3 being my real IP address, or it might record them all fine. I have another similar board on the same hosting account and that doesn't seem to have the same problem at all. All the best Keith Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.