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--EXTENSIONS--
18session
19--SKIPIF--
20<?php include('skipif.inc'); ?>
21--COOKIE--
22PHPSESSID=rfc1867-sid-get-2-cookie
23--GET--
24PHPSESSID=rfc1867-sid-get-2
25--POST_RAW--
26Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
27-----------------------------20896060251896012921717172737
28Content-Disposition: form-data; name="PHPSESSID"
29
30rfc1867-sid-get-2-post
31-----------------------------20896060251896012921717172737
32Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
33
34rfc1867_sid_get_2.php
35-----------------------------20896060251896012921717172737
36Content-Disposition: form-data; name="file1"; filename="file1.txt"
37
381
39-----------------------------20896060251896012921717172737
40Content-Disposition: form-data; name="file2"; filename="file2.txt"
41
422
43-----------------------------20896060251896012921717172737--
44--FILE--
45<?php
46session_start();
47var_dump(session_id());
48var_dump(basename(__FILE__) == $_POST[ini_get("session.upload_progress.name")]);
49var_dump($_FILES);
50var_dump($_SESSION["upload_progress_" . basename(__FILE__)]);
51session_destroy();
52?>
53--EXPECTF--
54string(%d) "rfc1867-sid-get-2"
55bool(true)
56array(2) {
57  ["file1"]=>
58  array(6) {
59    ["name"]=>
60    string(9) "file1.txt"
61    ["full_path"]=>
62    string(9) "file1.txt"
63    ["type"]=>
64    string(0) ""
65    ["tmp_name"]=>
66    string(%d) "%s"
67    ["error"]=>
68    int(0)
69    ["size"]=>
70    int(1)
71  }
72  ["file2"]=>
73  array(6) {
74    ["name"]=>
75    string(9) "file2.txt"
76    ["full_path"]=>
77    string(9) "file2.txt"
78    ["type"]=>
79    string(0) ""
80    ["tmp_name"]=>
81    string(%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}
135