#23486 [NEW]: Session expires on redirection
| From: | bangboy2k2 at hotmail dot com | Date: | Mon, 05 May 2003 06:23:15 +0000 |
| Subject: | #23486 [NEW]: Session expires on redirection | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-39054@lists.php.net to get a copy of this message | ||
From: bangboy2k2 at hotmail dot com
Operating system: Windows 2000 Advanced Server
PHP version: 4.3.2RC1
PHP Bug Type: Session related
Bug description: Session expires on redirection
Hi there,
i have been working with ASP/JSP for quite sometime. now getting into PHP.
i'm facing too many problems related to sessions.
I have a page in which after validating username and password i'm placing
the username in session and redirecting to a page. in the next page
session expires unconditionally. i am starting sessions explicitly and
using ob_start() for optimized redirects...
where as if i write some text to the response stream and then try to
access the same page... session works very fine. Is there any solution to
over come this? i'm placing the code snippets below to analyze.
$row = mysql_fetch_array($result, MYSQL_BOTH);
$_SESSION["uid"] = $row[0];
$_SESSION["uname"] = $row[1];
header("Location: bohome.php");
session fails in bohome.php (note i am starting session even in
bohome.php).
--
Edit bug report at http://bugs.php.net/?id=23486&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23486&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23486&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23486&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23486&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23486&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23486&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23486&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23486&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23486&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23486&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23486&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23486&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23486&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23486&r=gnused