php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36881 Session don't store after header("Location: ...")
Submitted: 2006-03-28 00:37 UTC Modified: 2006-03-28 11:45 UTC
From: kylnas at tiscali dot it Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.4.2 OS: OS Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kylnas at tiscali dot it
New email:
PHP Version: OS:

 

 [2006-03-28 00:37 UTC] kylnas at tiscali dot it
Description:
------------
I saw other bugs like this, and I didn't solve it.

My situation:
- mysql session handler
- one page is "posted" to another page, that saves a session variable and redirect to the first page again.

If I do the redirect the variable is not properly setted, otherwise it's all ok.

My PHP version is 4.3.10-16


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-28 00:51 UTC] tony2001@php.net
Use cookies to store session ID or add it to the URL manually.
No bug here.
 [2006-03-28 00:58 UTC] kylnas at tiscali dot it
Really, sorry, but i don't understand why it's not a bug...=(
 [2006-03-28 01:09 UTC] tony2001@php.net
Because if you don't use cookies, how do you think session ID should be preserved?
There are only two ways to preserve it: save it in a cookie and keep it in the URL.
Obviously you don't use cookies (otherwise it would work) and abusing the second way.
 [2006-03-28 01:18 UTC] kylnas at tiscali dot it
I use cookies...this is the code when session starts:

@ini_set('session.use_cookies', true);
@ini_set('session.use_only_cookies', false);
@ini_set('url_rewriter.tags', '');
@ini_set('arg_separator.output', '&');
 [2006-03-28 11:45 UTC] kylnas at tiscali dot it
I still have this problem...I have a cookie with session_id setted, ma still variable is not stored to db.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Aug 09 01:00:02 2025 UTC