Forum Showing Same IP Address For All Users

Status
Not open for further replies.

Shazza

New Member
2
2011
0
0
Hey,

I am having an issue on vBulletin and other scripts whereby the User IP is shown as the server IP. This is the test returned from the php function:

Code:
[COLOR=#000000][COLOR=#0000bb]<?php
header[/COLOR][COLOR=#007700]([/COLOR][COLOR=#dd0000]"Content-Type: text/plain"[/COLOR][COLOR=#007700]);
[/COLOR][COLOR=#0000bb]var_dump[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000bb]$_SERVER[/COLOR][COLOR=#007700]);
exit();
[/COLOR][COLOR=#0000bb]?>[/COLOR][/COLOR]
Code:
array(39) {
  ["SERVER_SIGNATURE"]=>
  string(186) "<address>Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.caught-offside.com Port 80</address>
"
  ["HTTP_USER_AGENT"]=>
  string(90) "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15"
  ["HTTP_X_FORWARDED_FOR"]=>
  string(11) "MY IP"
  ["SERVER_PORT"]=>
  string(2) "80"
  ["HTTP_HOST"]=>
  string(22) "www.caught-offside.com"
  ["HTTP_X_REAL_IP"]=>
  string(11) "MY IP"
  ["DOCUMENT_ROOT"]=>
  string(24) "/home/caught/public_html"
  ["HTTP_ACCEPT_CHARSET"]=>
  string(30) "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
  ["SCRIPT_FILENAME"]=>
  string(40) "/home/caught/public_html/forum/issue.php"
  ["REQUEST_URI"]=>
  string(16) "/forum/issue.php"
  ["SCRIPT_NAME"]=>
  string(16) "/forum/issue.php"
  ["HTTP_CONNECTION"]=>
  string(5) "close"
  ["REMOTE_PORT"]=>
  string(5) "59492"
  ["PATH"]=>
  string(28) "/usr/local/bin:/usr/bin:/bin"
  ["PWD"]=>
  string(25) "/usr/local/cpanel/cgi-sys"
  ["SERVER_ADMIN"]=>
  string(24) "admin@caught-offside.com"
  ["REDIRECT_STATUS"]=>
  string(3) "200"
  ["HTTP_ACCEPT_LANGUAGE"]=>
  string(14) "en-gb,en;q=0.5"
  ["HTTP_ACCEPT"]=>
  string(63) "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
  ["REMOTE_ADDR"]=>
  string(13) "94.75.237.209"
  ["SHLVL"]=>
  string(1) "0"
  ["SERVER_NAME"]=>
  string(22) "www.caught-offside.com"
  ["HTTP_X_PERSONASINTERACTIVE_ADDON"]=>
  string(4) "true"
  ["SERVER_SOFTWARE"]=>
  string(125) "Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635"
  ["QUERY_STRING"]=>
  string(0) ""
  ["SERVER_ADDR"]=>
  string(13) "94.75.237.209"
  ["GATEWAY_INTERFACE"]=>
  string(7) "CGI/1.1"
  ["SERVER_PROTOCOL"]=>
  string(8) "HTTP/1.0"
  ["REDIRECT_URL"]=>
  string(16) "/forum/issue.php"
  ["REQUEST_METHOD"]=>
  string(3) "GET"
  ["HTTP_COOKIE"]=>
  string(282) "bblastvisit=1298851255; bblastactivity=0; vbulletin_userlist_hide_avatars_buddylist=0; vbulletin_userlist_hide_avatars_incomingreqs=0; bbuserid=1; bbpassword=8ff0c48b44539343643fb363fac3898b; bbsessionhash=21199ae62e7efe3d06b5779237d9f9e9; PHPSESSID=feec0582dd9f3c40303244f0cc4d266b"
  ["ORIG_SCRIPT_FILENAME"]=>
  string(30) "/usr/local/cpanel/cgi-sys/php5"
  ["ORIG_PATH_INFO"]=>
  string(16) "/forum/issue.php"
  ["ORIG_PATH_TRANSLATED"]=>
  string(40) "/home/caught/public_html/forum/issue.php"
  ["ORIG_SCRIPT_NAME"]=>
  string(13) "/cgi-sys/php5"
  ["PHP_SELF"]=>
  string(16) "/forum/issue.php"
  ["REQUEST_TIME"]=>
  int(1299566772)
  ["argv"]=>
  array(0) {
  }
  ["argc"]=>
  int(0)
}
I tried adding the following suggested code into the config file:

Code:
[COLOR=#000000][COLOR=#0000bb]$_SERVER[/COLOR][COLOR=#007700][[/COLOR][COLOR=#dd0000]"REMOTE_ADDR"[/COLOR][COLOR=#007700]] = ( isset([/COLOR][COLOR=#0000bb]$_SERVER[/COLOR][COLOR=#007700][[/COLOR][COLOR=#dd0000]"HTTP_X_REAL_IP"[/COLOR][COLOR=#007700]]) ? [/COLOR][COLOR=#0000bb]$_SERVER[/COLOR][COLOR=#007700][[/COLOR][COLOR=#dd0000]"HTTP_X_REAL_IP"[/COLOR][COLOR=#007700]]  : [/COLOR][COLOR=#0000bb]$_SERVER[/COLOR][COLOR=#007700][[/COLOR][COLOR=#dd0000]"REMOTE_ADDR"[/COLOR][COLOR=#007700]] );[/COLOR][/COLOR]
This did not work.

Please could you help me? 8-)
 
4 comments
Status
Not open for further replies.
Back
Top