Otomatik [kapalı] çıktınız

1 Cevap php

I have a php page from where my users log-in to the application. It is working fine. Yesterday, all of a sudden the users were able to login but were forced out and redirected to the login page again.

Benim veritabanı kullanıcının giriş zamanlamaları açmış ve bu sorun otomatik olarak yaklaşık 2 saat sonra çözüldü.

Bu neden olur gibi olacak?


In the following code it will check for the session value and if it is not found then redirect to the error page. Yesterday, it was redirecting to error page even if the session value was set.

<?php
if($_SESSION['ucd']<>"" && $_SESSION['sid']<>"" && $_SESSION['sid']<>0)
{
$query="select count(*) from active_sessions where user_cd='".$_SESSION['ucd']."'
and session_no='".$_SESSION['sid']."' and START_TM like DATE_FORMAT(now(),'%Y-%m-%d%')";
//echo $query;
$cnt=$dbop->select($query);
if($cnt[0] == '0')
{
$sender = "sender=".urlencode($_SERVER['PHP_SELF']);
session_unset();
header("Location:../login/error.html?$sender");
die;
}
else{
$query = "update active_sessions set LAST_ACTIVITY = NOW() WHERE SESSION_NO = ".$_SESSION['sid'];
mysql_query($query);
?>

<?php
}
}
else
{
$sender = "sender=".urlencode($_SERVER['PHP_SELF']);
session_unset();
header("Location:../login/error.html?$sender");
die;
}
?>

1 Cevap

Ben her yerde kodu () session_start görmüyorum.