mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Set session_save_path & fix logout URL
Some hosts have a loop around issue with no session being available after a header location redirect After much research, I've found this is due to some hosts not having a session save path and it needs to be set using PHP Setting this means ICEcoder works on those few hosts Fix to bad URL on logout
This commit is contained in:
@@ -16,7 +16,10 @@ $context = stream_context_create(array('http'=>
|
||||
));
|
||||
|
||||
// Start a session if we haven't already
|
||||
if(!isset($_SESSION)) {@session_start();}
|
||||
if(!isset($_SESSION)) {
|
||||
session_save_path(dirname(__FILE__).'/../tmp');
|
||||
@session_start();
|
||||
}
|
||||
|
||||
// Set the language file
|
||||
$text = $_SESSION['text'];
|
||||
@@ -28,7 +31,7 @@ if (isset($_GET['logout'])) {
|
||||
$_SESSION['loggedIn']=false;
|
||||
$_SESSION['username']=false;
|
||||
session_destroy();
|
||||
header("Location: dirname(__FILE__)./?loggedOut");
|
||||
header("Location: ".dirname(__FILE__)."/?loggedOut");
|
||||
}
|
||||
|
||||
// If magic quotes are still on (attempted to switch off in php.ini)
|
||||
|
||||
Reference in New Issue
Block a user