Bug #69029 [Opn->Nab]: header function don't work correct

From: Date: Wed, 11 Feb 2015 14:27:23 +0000
Subject: Bug #69029 [Opn->Nab]: header function don't work correct
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190584@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69029&edit=1 ID: 69029 Updated by: ab@php.net Reported by: mojtaba dot khani at yahoo dot com Summary: header function don't work correct -Status: Open +Status: Not a bug Type: Bug Package: Unknown/Other Function Operating System: win PHP Version: 5.4.37 Block user comment: N Private report: N New Comment: Thanks for the report. For what I can see from your code, you have to exit(); after sending the location header. Thanks. Previous Comments: ------------------------------------------------------------------------ [2015-02-11 13:35:34] mojtaba dot khani at yahoo dot com 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"); } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69029&edit=1

« previous php.bugs (#190584) next »