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