Login Script won't work form php update 4 to 4.6 version. Did any of the syntax handling dramatically change from versions 4 to 4.6 that would affect login scripts?
if (isset($user_id)) {
$user_id = strtolower($user_id);
if ($user_id == "root") {
$path = $path."root";
} else {
$path = $path.$location."/".$user_id;
}
$user_profile = read_associative_array($path);
if ($user_profile) {
if (compare_passwords($user_profile["password"], $password)) {
if ( ($user_profile["expiry"] == 0) || ($user_profile["expiry"] > time()) ) {
$session_key = open_session($location, $user_id, $user_profile["access"]);
setcookie("location", $location);
setcookie("user_id", $user_id);
setcookie("session_key", $session_key);
setcookie("failure", "");
} else {
setcookie("failure", "*EXPIRED*");
unlink($path);
}
} else {
setcookie("failure", "*PASSWORD*");
}
} else {
setcookie("failure", "*USER_ID*");
}
}