2011-07-28, 06:18 AM
This is just a fix for getting a users actual IP instead of CloudFlare's ip on MyBB 1.6.4 as the 1.6.3 fix doesn't work on 1.6.4
1. Go to /inc/ in your MyBB directory and open up functions.php
2. Go to line 2889 and edit the following:
Replace:
with:
Reupload the file and enjoy!
1. Go to /inc/ in your MyBB directory and open up functions.php
2. Go to line 2889 and edit the following:
Replace:
if(!preg_match("#^(10|172\.16|192\.168)\.#", $_SERVER['REMOTE_ADDR']))
{
$ip = $_SERVER['REMOTE_ADDR'];
}
with:
if(!preg_match("#^(10|172\.16|192\.168)\.#", $_SERVER['HTTP_CF_CONNECTING_IP']))
{
$ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
}
Reupload the file and enjoy!