since I found nothing online regarding my issue here's the deal:
I'm setting 2 variables on my login page: (login.php)
session_start();
$_SESSION['active']='1';
$_SESSION['user']=$login;
$login is from my post
And I'm using another file to check if the user is logged in some cases: (session_debug.php):
session_start();
if($_SESSION['active'] != '1'){
header("Location: ../index.php");
}
The same pages worked on my old server, I've transfered them to my localhost to test some stuff (I'm using apache) and this simply doesn't work. In my index.php I'm NOT requiring or including the session_debug.php but everytime I try to go to login.php it just redirects me to index.php, like I was requiring that file on my index, but I'm not... Heres the error:
Undefined index: active in Z:\xampp\htdocs\web\php\session_debug.php on line 3
I already tried to make clean installations of xampp and using different versions but, no result.
Looks like its always requiring the session_debug.php file even if I don't want it to do so, but I have no idea why or how to do something about it.