Bug #60196 [NEW]: Session Upload Progress - doesn't work
| From: | martin at psinas dot com | Date: | Tue, 01 Nov 2011 23:34:08 +0000 |
| Subject: | Bug #60196 [NEW]: Session Upload Progress - doesn't work | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-164780@lists.php.net to get a copy of this message | ||
From:
Operating system: Ubuntu 10.04 / Apache2
PHP version: 5.4.0beta2
Package: Session related
Bug Type: Bug
Bug description:Session Upload Progress - doesn't work
Description:
------------
Trying to test this new feature documented here:
http://php.net/manual/en/session.upload-progress.php
Can't seem to get it working.
Test script:
---------------
// form.php
<?php
session_start();
?>
<form action="upload.php" method="POST"
enctype="multipart/form-data">
<input type="hidden" name="<?php echo
ini_get("session.upload_progress.name"); ?>" value="123" />
<input type="file" name="file1" />
<input type="file" name="file2" />
<input type="submit" />
</form>
// upload.php
<?php
session_start();
var_dump($_SESSION);
?>
Expected result:
----------------
I expect the following session values to be populated:
<?php
$_SESSION["upload_progress_123"] = array(
"start_time" => 1234567890, // The request time
"content_length" => 57343257, // POST content length
"bytes_processed" => 453489, // Amount of bytes received and processed
"done" => false, // true when the POST handler has finished,
successfully or not
"files" => array(
0 => array(
"field_name" => "file1", // Name of the <input/> field
// The following 3 elements equals those in $_FILES
"name" => "foo.avi",
"tmp_name" => "/tmp/phpxxxxxx",
"error" => 0,
"done" => true, // True when the POST handler has
finished
handling this file
"start_time" => 1234567890, // When this file has started to be
processed
"bytes_processed" => 57343250, // Amount of bytes received and processed
for
this file
),
// An other file, not finished uploading, in the same request
1 => array(
"field_name" => "file2",
"name" => "bar.avi",
"tmp_name" => NULL,
"error" => 0,
"done" => false,
"start_time" => 1234567899,
"bytes_processed" => 54554,
),
)
);
?>
Actual result:
--------------
I get this:
array(0) {}
--
Edit bug report at https://bugs.php.net/bug.php?id=60196&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60196&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60196&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60196&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=60196&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60196&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=60196&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=60196&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=60196&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=60196&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=60196&r=support
Expected behavior: https://bugs.php.net/fix.php?id=60196&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=60196&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=60196&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=60196&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60196&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=60196&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=60196&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=60196&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=60196&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=60196&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=60196&r=mysqlcfg