stilger
10-15-2002, 02:33 PM
Has anyone come up with a hack to make Vbull work properly when you are using squid for cacheing? I was thinking of trying to do something like this:
From original admin/session.php
// ###################### Start sessions #######################
// get session info
unset($bbuserinfo);
unset($session);
// get first 50 chars
$HTTP_USER_AGENT=substr($HTTP_USER_AGENT,0,50);
$REMOTE_ADDR=substr($REMOTE_ADDR,0,50);
I was thinking of changing to something like this:
// ###################### Start sessions #######################
// get session info
unset($bbuserinfo);
unset($session);
// get first 50 chars
$HTTP_USER_AGENT=substr($HTTP_USER_AGENT,0,50);
if $REMOTE_ADDR='127.0.0.1' {
$REMOTE_ADDR=substr($HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR'],0,50);
} else {
$REMOTE_ADDR=substr($REMOTE_ADDR,0,50);
Any help with my syntax and idea would be great.
Squid always reports 127.0.0.1 for the REMOTE_ADDR. There are times when we bypass squid so that I would not want to change it to a permanent setting. Making these changes in the functions.php or global.php would be ok by me also but I could not find what I thought was the correct spot..
Thanks for any help.
From original admin/session.php
// ###################### Start sessions #######################
// get session info
unset($bbuserinfo);
unset($session);
// get first 50 chars
$HTTP_USER_AGENT=substr($HTTP_USER_AGENT,0,50);
$REMOTE_ADDR=substr($REMOTE_ADDR,0,50);
I was thinking of changing to something like this:
// ###################### Start sessions #######################
// get session info
unset($bbuserinfo);
unset($session);
// get first 50 chars
$HTTP_USER_AGENT=substr($HTTP_USER_AGENT,0,50);
if $REMOTE_ADDR='127.0.0.1' {
$REMOTE_ADDR=substr($HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR'],0,50);
} else {
$REMOTE_ADDR=substr($REMOTE_ADDR,0,50);
Any help with my syntax and idea would be great.
Squid always reports 127.0.0.1 for the REMOTE_ADDR. There are times when we bypass squid so that I would not want to change it to a permanent setting. Making these changes in the functions.php or global.php would be ok by me also but I could not find what I thought was the correct spot..
Thanks for any help.