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_strict_mode=0
11session.use_cookies=1
12session.use_only_cookies=0
13session.upload_progress.enabled=1
14session.upload_progress.cleanup=0
15session.upload_progress.prefix=upload_progress_
16session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
17session.upload_progress.freq=1%
18session.upload_progress.min_freq=0.000000001
19session.save_handler=files
20--SKIPIF--
21<?php include('skipif.inc'); ?>
22--COOKIE--
23PHPSESSID=rfc1867-tests
24--GET--
25PHPSESSID=rfc1867-tests-get
26--POST_RAW--
27Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
28-----------------------------20896060251896012921717172737
29Content-Disposition: form-data; name="PHPSESSID"
30
31rfc1867-tests-post
32-----------------------------20896060251896012921717172737
33Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
34
35rfc1867_inter.php_1
36-----------------------------20896060251896012921717172737
37Content-Disposition: form-data; name="file1"; filename="file1.txt"
38
391
40-----------------------------20896060251896012921717172737
41Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
42
43rfc1867_inter.php_2
44-----------------------------20896060251896012921717172737
45Content-Disposition: form-data; name="file2"; filename="file2.txt"
46
472
48-----------------------------20896060251896012921717172737--
49--FILE--
50<?php
51session_start();
52var_dump(session_id());
53var_dump($_FILES);
54var_dump($_SESSION["upload_progress_" . basename(__FILE__) . "_1"]);
55var_dump($_SESSION["upload_progress_" . basename(__FILE__) . "_2"]);
56session_destroy();
57?>
58--EXPECTF--
59string(%d) "rfc1867-tests"
60array(2) {
61  ["file1"]=>
62  array(5) {
63    ["name"]=>
64    %string|unicode%(9) "file1.txt"
65    ["type"]=>
66    %string|unicode%(0) ""
67    ["tmp_name"]=>
68    %string|unicode%(%d) "%s"
69    ["error"]=>
70    int(0)
71    ["size"]=>
72    int(1)
73  }
74  ["file2"]=>
75  array(5) {
76    ["name"]=>
77    %string|unicode%(9) "file2.txt"
78    ["type"]=>
79    %string|unicode%(0) ""
80    ["tmp_name"]=>
81    %string|unicode%(%d) "%s"
82    ["error"]=>
83    int(0)
84    ["size"]=>
85    int(1)
86  }
87}
88array(5) {
89  ["start_time"]=>
90  int(%d)
91  ["content_length"]=>
92  int(%d)
93  ["bytes_processed"]=>
94  int(%d)
95  ["done"]=>
96  bool(true)
97  ["files"]=>
98  array(2) {
99    [0]=>
100    array(7) {
101      ["field_name"]=>
102      string(5) "file1"
103      ["name"]=>
104      string(9) "file1.txt"
105      ["tmp_name"]=>
106      string(%d) "%s"
107      ["error"]=>
108      int(0)
109      ["done"]=>
110      bool(true)
111      ["start_time"]=>
112      int(%d)
113      ["bytes_processed"]=>
114      int(1)
115    }
116    [1]=>
117    array(7) {
118      ["field_name"]=>
119      string(5) "file2"
120      ["name"]=>
121      string(9) "file2.txt"
122      ["tmp_name"]=>
123      string(%d) "%s"
124      ["error"]=>
125      int(0)
126      ["done"]=>
127      bool(true)
128      ["start_time"]=>
129      int(%d)
130      ["bytes_processed"]=>
131      int(1)
132    }
133  }
134}
135NULL
136