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--EXTENSIONS--
18session
19--SKIPIF--
20<?php include('skipif.inc'); ?>
21--GET--
22PHPSESSID=rfc1867-sid-get
23--POST_RAW--
24Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
25-----------------------------20896060251896012921717172737
26Content-Disposition: form-data; name="PHPSESSID"
27
28rfc1867-sid-get-post
29-----------------------------20896060251896012921717172737
30Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
31
32rfc1867_sid_get.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-sid-get"
53bool(true)
54array(2) {
55  ["file1"]=>
56  array(6) {
57    ["name"]=>
58    string(9) "file1.txt"
59    ["full_path"]=>
60    string(9) "file1.txt"
61    ["type"]=>
62    string(0) ""
63    ["tmp_name"]=>
64    string(%d) "%s"
65    ["error"]=>
66    int(0)
67    ["size"]=>
68    int(1)
69  }
70  ["file2"]=>
71  array(6) {
72    ["name"]=>
73    string(9) "file2.txt"
74    ["full_path"]=>
75    string(9) "file2.txt"
76    ["type"]=>
77    string(0) ""
78    ["tmp_name"]=>
79    string(%d) "%s"
80    ["error"]=>
81    int(0)
82    ["size"]=>
83    int(1)
84  }
85}
86array(5) {
87  ["start_time"]=>
88  int(%d)
89  ["content_length"]=>
90  int(%d)
91  ["bytes_processed"]=>
92  int(%d)
93  ["done"]=>
94  bool(true)
95  ["files"]=>
96  array(2) {
97    [0]=>
98    array(7) {
99      ["field_name"]=>
100      string(5) "file1"
101      ["name"]=>
102      string(9) "file1.txt"
103      ["tmp_name"]=>
104      string(%d) "%s"
105      ["error"]=>
106      int(0)
107      ["done"]=>
108      bool(true)
109      ["start_time"]=>
110      int(%d)
111      ["bytes_processed"]=>
112      int(1)
113    }
114    [1]=>
115    array(7) {
116      ["field_name"]=>
117      string(5) "file2"
118      ["name"]=>
119      string(9) "file2.txt"
120      ["tmp_name"]=>
121      string(%d) "%s"
122      ["error"]=>
123      int(0)
124      ["done"]=>
125      bool(true)
126      ["start_time"]=>
127      int(%d)
128      ["bytes_processed"]=>
129      int(1)
130    }
131  }
132}
133