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  [%u|b%"file1"]=>
62  array(5) {
63    [%u|b%"name"]=>
64    %string|unicode%(9) "file1.txt"
65    [%u|b%"type"]=>
66    %string|unicode%(0) ""
67    [%u|b%"tmp_name"]=>
68    %string|unicode%(%d) "%s"
69    [%u|b%"error"]=>
70    int(0)
71    [%u|b%"size"]=>
72    int(1)
73  }
74  [%u|b%"file2"]=>
75  array(5) {
76    [%u|b%"name"]=>
77    %string|unicode%(9) "file2.txt"
78    [%u|b%"type"]=>
79    %string|unicode%(0) ""
80    [%u|b%"tmp_name"]=>
81    %string|unicode%(%d) "%s"
82    [%u|b%"error"]=>
83    int(0)
84    [%u|b%"size"]=>
85    int(1)
86  }
87}
88array(5) {
89  [%u|b%"start_time"]=>
90  int(%d)
91  [%u|b%"content_length"]=>
92  int(%d)
93  [%u|b%"bytes_processed"]=>
94  int(%d)
95  [%u|b%"done"]=>
96  bool(true)
97  [%u|b%"files"]=>
98  array(2) {
99    [0]=>
100    array(7) {
101      [%u|b%"field_name"]=>
102      %unicode|string%(5) "file1"
103      [%u|b%"name"]=>
104      %unicode|string%(9) "file1.txt"
105      [%u|b%"tmp_name"]=>
106      %unicode|string%(%d) "%s"
107      [%u|b%"error"]=>
108      int(0)
109      [%u|b%"done"]=>
110      bool(true)
111      [%u|b%"start_time"]=>
112      int(%d)
113      [%u|b%"bytes_processed"]=>
114      int(1)
115    }
116    [1]=>
117    array(7) {
118      [%u|b%"field_name"]=>
119      %unicode|string%(5) "file2"
120      [%u|b%"name"]=>
121      %unicode|string%(9) "file2.txt"
122      [%u|b%"tmp_name"]=>
123      %unicode|string%(%d) "%s"
124      [%u|b%"error"]=>
125      int(0)
126      [%u|b%"done"]=>
127      bool(true)
128      [%u|b%"start_time"]=>
129      int(%d)
130      [%u|b%"bytes_processed"]=>
131      int(1)
132    }
133  }
134}
135NULL
136