FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » FUDForum 3.0 SQL errors with SQLite
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: FUDForum 3.0 SQL errors with SQLite [message #160710 is a reply to message #160709] Fri, 16 October 2009 03:19 Go to previous messageGo to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma:
Senior Member
Administrator
Core Developer
Something like this should fix it:
Index: core.inc
===================================================================
RCS file: /forum21/install/forum_data/include/core.inc,v
retrieving revision 1.204
diff -u -r1.204 core.inc
--- core.inc    7 Oct 2009 15:19:24 -0000       1.204
+++ core.inc    16 Oct 2009 03:12:39 -0000
@@ -89,6 +89,7 @@
        if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
                $ip = strtok($_SERVER['HTTP_X_FORWARDED_FOR'], ',');
                do {
+                       $ip = str_replace('::ffff:', '', $ip);
                        if (($lip = ip2long($ip)) === -1) {
                                continue;
                        }
@@ -104,7 +105,10 @@
                        return long2ip($lip);
                } while (($ip = strtok(',')));
        }
-       return (isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0');
+
+       $ip = isset($_SERVER['HTTP_CLIENT_IP']) ? $_SERVER['HTTP_CLIENT_IP'] : $_SERVER['REMOTE_ADDR'];
+       $ip = str_replace('::ffff:', '', $ip);
+       return (!empty($ip) ? $ip : '0.0.0.0');
 }

 function ssn($str)


I would appreciate if you can test the above patch before we commit it.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GLOBALS.php not created on installation
Next Topic: Step 2 installation error PLEASE HELP!!!
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 08:40:38 GMT 2024

Total time taken to generate the page: 0.05005 seconds