Current time: 07-25-2014, 11:03 PM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MyBB 1.6.4 CloudFlare user ip fix
07-28-2011, 06:18 AM
Post: #1
MyBB 1.6.4 CloudFlare user ip fix
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:
Code:
if(!preg_match("#^(10|172\.16|192\.168)\.#", $_SERVER['REMOTE_ADDR']))
    {
        $ip = $_SERVER['REMOTE_ADDR'];
    }

with:
Code:
if(!preg_match("#^(10|172\.16|192\.168)\.#", $_SERVER['HTTP_CF_CONNECTING_IP']))
    {
        $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
    }

Reupload the file and enjoy!
Find all posts by this user
Quote this message in a reply
08-21-2011, 11:33 AM
Post: #2
RE: MyBB 1.6.4 CloudFlare user ip fix
This user has been denied support. This user has been denied support.
tooooo hard to dd code


my pc hanged
Visit this user's website Find all posts by this user
Quote this message in a reply
08-21-2011, 11:47 AM
Post: #3
RE: MyBB 1.6.4 CloudFlare user ip fix
Pretty sure 1.6.4 has a fix for this already Wink It's under Server & Optimisation settings I believe.

I could be entirely wrong though as I haven't used cloudflare for a while.

Visit this user's website Find all posts by this user
Quote this message in a reply
08-22-2011, 01:43 AM
Post: #4
RE: MyBB 1.6.4 CloudFlare user ip fix
http://www.cloudflare.com/wiki/MyBB_1.6

Skip the B.S, Host MyBB caters to MyBB.
Visit this user's website Find all posts by this user
Quote this message in a reply
12-11-2011, 03:18 PM
Post: #5
RE: MyBB 1.6.4 CloudFlare user ip fix
Thank you Richard Toungue
Find all posts by this user
Quote this message in a reply
06-06-2012, 11:33 AM
Post: #6
RE: MyBB 1.6.4 CloudFlare user ip fix
Does it work for 1.6.8 too?
Find all posts by this user
Quote this message in a reply
06-06-2012, 11:56 AM
Post: #7
RE: MyBB 1.6.4 CloudFlare user ip fix
Not needed for 1.6.8: ACP > Config > Settings > Server and Optimization Options > Scrutinize User's IP address? = Yes

Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication