1--TEST--
2session rfc1867
3--INI--
4file_uploads=1
5error_reporting=E_ALL&~E_NOTICE
6comment=debug builds show some additional E_NOTICE errors
7upload_max_filesize=1024
8session.save_path=
9session.name=PHPSESSID
10session.use_cookies=1
11session.use_only_cookies=0
12session.upload_progress.enabled=1
13session.upload_progress.cleanup=1
14session.upload_progress.prefix=upload_progress_
15session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
16session.upload_progress.freq=1%
17session.upload_progress.min_freq=0.000000001
18--SKIPIF--
19<?php include('skipif.inc'); ?>
20--COOKIE--
21PHPSESSID=rfc1867-tests
22--GET--
23PHPSESSID=rfc1867-tests-get
24--POST_RAW--
25Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
26-----------------------------20896060251896012921717172737
27Content-Disposition: form-data; name="PHPSESSID"
28
29rfc1867-tests-post
30-----------------------------20896060251896012921717172737
31Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
32
33rfc1867_cleanup.php
34-----------------------------20896060251896012921717172737
35Content-Disposition: form-data; name="file1"; filename="file1.txt"
36
371
38-----------------------------20896060251896012921717172737
39Content-Disposition: form-data; name="file2"; filename="file2.txt"
40
412
42-----------------------------20896060251896012921717172737--
43--FILE--
44<?php
45session_start();
46var_dump(session_id());
47var_dump(basename(__FILE__) == $_POST[ini_get("session.upload_progress.name")]);
48var_dump($_FILES);
49var_dump($_SESSION["upload_progress_" . basename(__FILE__)]);
50session_destroy();
51?>
52--EXPECTF--
53string(%d) "rfc1867-tests"
54bool(true)
55array(2) {
56  [%u|b%"file1"]=>
57  array(5) {
58    [%u|b%"name"]=>
59    %string|unicode%(9) "file1.txt"
60    [%u|b%"type"]=>
61    %string|unicode%(0) ""
62    [%u|b%"tmp_name"]=>
63    %string|unicode%(%d) "%s"
64    [%u|b%"error"]=>
65    int(0)
66    [%u|b%"size"]=>
67    int(1)
68  }
69  [%u|b%"file2"]=>
70  array(5) {
71    [%u|b%"name"]=>
72    %string|unicode%(9) "file2.txt"
73    [%u|b%"type"]=>
74    %string|unicode%(0) ""
75    [%u|b%"tmp_name"]=>
76    %string|unicode%(%d) "%s"
77    [%u|b%"error"]=>
78    int(0)
79    [%u|b%"size"]=>
80    int(1)
81  }
82}
83NULL
84