Hi
I'm getting the following error message when logging in on a site I'm developing.
Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /mnt/array1/system/web/htdocs/login.php on line 55
Warning: Cannot modify header information - headers already sent by (output started at /mnt/array1/system/web/htdocs/includes/config.php:8) in /mnt/array1/system/web/htdocs/login.php on line 60
Here is the code with lines 55 & 60 highlighted
//Check whether the query was successful or not
if($result) {
if(mysql_num_rows($result) == 1) {
//Login Successful
session_regenerate_id(); //Line 55
$member = mysql_fetch_assoc($result);
$_SESSION['SESS_USER_ID'] = $member['id'];
$_SESSION['SESS_USERNAME'] = $member['username'];
session_write_close();
header("location: admin.php"); //Line 60
exit();
}else {
//Login failed
header("location: login.php?login=failed");
exit();
}
}else {
die("Query failed");
}
}
I have this code on my domain and it works fine, however I'm trying to get it working on a Link Station NAS box. Could it be that sessions are disabled or something?
Any help would be greatly received.