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