I am new to this forum, as I have been to so many and have memberships all over the place, and noone can actually tell me how to fix this or a way to find out why on earth after over 1 year this happens to 6 sites I have using this script all at one time...........
Ok, I am posting the script, I have checked and checked other scripts that have this one page where the error keeps popping up at this certain line 56.
Now the line in Question and giving this awlful headache is going to be in BOLD RED...........Ok !!!!
$_SESSION['sess_data']['mmax'] = $rate;
switch($rate) {
case 1:
$rate = 'ratemin';
break;
case 0:
$rate = 'ratemax';
break;
default:
$rate = 'ratemax';
break;
}
$res = mysql_query("select $rate, ref from acctype, user where acctype.id=user.acctype && user.id=$usrid");
$_SESSION['sess_data']['rate'] = mysql_result($res, 0, $rate);
$_SESSION['sess_data']['ref'] = mysql_result($res, 0, "ref");
$_SESSION['sess_data']['surfing'] = rand(9999, 9999999999);
$_SESSION['sess_data']['from'] = md5($_SESSION['sess_data']['surfing']);
if ($_GET['next'] == md5($_SESSION['sess_data']['surf_encoder_vals'])) {
$s_bar_url = "surfbar.php?PHPSESSID=" . session_id() . "&vc_val=" . $_GET['next'];
} else {
$s_bar_url = "surfbar.php?PHPSESSID=" . session_id() . "&vc_val=begin&coder=". md5($_SESSION['sess_data']['from']);
}
header("Cache-control: private");
echo("<html>\n<head>\n<title>$title: Surf</title>\n<link rel=stylesheet type=text/css href=$self_url" . "style.css>\n</head>\n<frameset rows=$bar_height,* border=0><frame marginheight=0 marginwidth=0 scrolling=no noresize border=0 src=\"$s_bar_url\"><frame marginheight=0 marginwidth=0 scrolling=auto noresize border=0 src=/target.php></frameset>\n</html>");
mysql_close;
exit;
?>
As this copy here I took out the flush() which was above the cache-control : private, and the surfing worked, but now I am getting another error due to this change which another forum told me to do the above, and I am trying to figure out why in the world it would cause another problem, with the header information on line 7 of the logout.php ???
I tried taking out the flush() even in it, and still get this error :
Warning: Cannot modify header information - headers already sent in /home/xxxx/public_html/xxxx/logout.php on line 7
Now I have searched the logout.php, which there isn't mush to search through lol but :
<?php
session_start();
include("vars.php");
$_SESSION = array();
session_destroy();
flush();
header("Location: $self_url?logged-out");
exit;
?>
And as I mentioned never had a problem with this until now, and this script has been up and working great for over a year..........anyone know what to do to tell me to try??
I have 6 sites that this happened to all at once same day.