|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68650 Cannot set session variables in a page handling session.upload_progress
Submitted: 2014-12-25 05:07 UTC Modified: 2020-01-26 01:09 UTC
Avg. Score:4.2 ± 1.0
Reproduced:3 of 4 (75.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: Chriswright96 at hotmail dot com Assigned:
Status: Re-Opened Package: Session related
PHP Version: 5.5.20 OS: Ubuntu Trusty
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
17 - 1 = ?
Subscribe to this entry?

 [2014-12-25 05:07 UTC] Chriswright96 at hotmail dot com
When using an upload form, with a hidden field with the, the target page cannot set new session variables.

If you use the example below (with session.upload_progress.cleanup set to off for debugging), you will notice that the 'new' session disappears when you navigate back to the first page.

Test script:
<form name="fileupload" action="test2.php" method="POST" enctype="multipart/form-data">
    <input type="hidden" name="<?php echo ini_get(""); ?>" value="123">
    <input type="file" name="newfile">
    <input type="submit" name="submit" value="Submit">
    if(!isset($_SESSION)) {

    if(!isset($_SESSION)) {
    $_SESSION['new']='Im a new value that will disappear';
<a href="test.php">Go back</a>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-12-26 15:50 UTC] Chriswright96 at hotmail dot com
This can be solved by using:
if (session_status() == PHP_SESSION_NONE) {

Instead of:

if(!isset($_SESSION)) {

But the reasoning behind this is still not clear in documentation
 [2017-10-24 09:01 UTC]
-Status: Open +Status: Suspended
 [2017-10-24 09:01 UTC]
This package has not had any releases for 6 years, so I'm gonna suspend it, any new maintainer that decides to pick this up can re-open this ticket.
 [2020-01-26 01:09 UTC]
-Status: Suspended +Status: Re-Opened -Package: uploadprogress +Package: Session related
 [2020-01-26 01:09 UTC]
This appears to be session-related and not related to the uploadprogress extension. I'm not sure whether it's still an issue, but I'm re-opening, just in case.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 18 06:03:37 2021 UTC