|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-02-11 14:27 UTC] ab@php.net
-Status: Open
+Status: Not a bug
[2015-02-11 14:27 UTC] ab@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 10:00:01 2026 UTC |
Description: ------------ header function did not work corectly some times. i send a example for test by your team thanks. mojtaba khani mojtaba.khani@yahoo.com +989351977673 Test script: --------------- security.php -------------------- session_start(); if(!isset($_SESSION["userName"])|| !isset($_SESSION["time"])||(300<=time()-$_SESSION["time"])) { session_destroy(); header("location:logInUser.php"); } require_once 'dbc.php';/// database configrator $_SESSION["time"]=time(); mysql_query(("update users set lastActivity=".time().",online=1 where userName='".$_SESSION['userName']."'"); other page ------------------------- require_once 'security.php'; /// new security.php --------------------------- session_start(); if(isset($_SESSION["userName"])&& isset($_SESSION["time"])&&(10>time()-$_SESSION["time"])) { $_SESSION["time"]=time(); require_once 'dbc.php'; Q("update users set lastActivity=".time().",online=1 where userName='".$_SESSION['userName']."'"); $ad; $ti; } else { session_destroy(); header ("location:../user/logInUser.php"); }