|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60303 Custom session handlers fail when using header redirect
Submitted: 2011-11-14 21:43 UTC Modified: 2011-11-15 09:36 UTC
From: wdouglascampbell at hotmail dot com Assigned:
Status: Closed Package: Session related
PHP Version: 5.3.8 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: wdouglascampbell at hotmail dot com
New email:
PHP Version: OS:


 [2011-11-14 21:43 UTC] wdouglascampbell at hotmail dot com
I have a custom session handler.  My session variables are not saved when I use a header redirect.  In fact, the $_SESSION array is shown as empty.

If I use the standard session handlers, everything works fine as expected.

Test script:
The three files for replicating this problem are can be retrieve from the following archive:

Expected result:
The following output should be displayed:

testarray(1) { ["test"]=> string(4) "test" } 

The above is displayed if I comment out the include_once line in test.php and test2.php.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-15 09:36 UTC] wdouglascampbell at hotmail dot com
Sorry.  I had an error in my sess_write routine and the sessions table entry was not being properly updated.

There is no bug.
 [2011-11-15 09:36 UTC] wdouglascampbell at hotmail dot com
-Status: Open +Status: Closed
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Dec 07 16:05:57 2022 UTC