1--TEST--
2session rfc1867 sid get
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_cookies=1
11session.use_only_cookies=0
12session.upload_progress.enabled=1
13session.upload_progress.cleanup=0
14session.upload_progress.prefix=upload_progress_
15session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
16session.upload_progress.freq=0
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  [%u|b%"file1"]=>
54  array(5) {
55    [%u|b%"name"]=>
56    %string|unicode%(9) "file1.txt"
57    [%u|b%"type"]=>
58    %string|unicode%(0) ""
59    [%u|b%"tmp_name"]=>
60    %string|unicode%(%d) "%s"
61    [%u|b%"error"]=>
62    int(0)
63    [%u|b%"size"]=>
64    int(1)
65  }
66  [%u|b%"file2"]=>
67  array(5) {
68    [%u|b%"name"]=>
69    %string|unicode%(9) "file2.txt"
70    [%u|b%"type"]=>
71    %string|unicode%(0) ""
72    [%u|b%"tmp_name"]=>
73    %string|unicode%(%d) "%s"
74    [%u|b%"error"]=>
75    int(0)
76    [%u|b%"size"]=>
77    int(1)
78  }
79}
80array(5) {
81  [%u|b%"start_time"]=>
82  int(%d)
83  [%u|b%"content_length"]=>
84  int(%d)
85  [%u|b%"bytes_processed"]=>
86  int(%d)
87  [%u|b%"done"]=>
88  bool(true)
89  [%u|b%"files"]=>
90  array(2) {
91    [0]=>
92    array(7) {
93      [%u|b%"field_name"]=>
94      %unicode|string%(5) "file1"
95      [%u|b%"name"]=>
96      %unicode|string%(9) "file1.txt"
97      [%u|b%"tmp_name"]=>
98      %unicode|string%(%d) "%s"
99      [%u|b%"error"]=>
100      int(0)
101      [%u|b%"done"]=>
102      bool(true)
103      [%u|b%"start_time"]=>
104      int(%d)
105      [%u|b%"bytes_processed"]=>
106      int(1)
107    }
108    [1]=>
109    array(7) {
110      [%u|b%"field_name"]=>
111      %unicode|string%(5) "file2"
112      [%u|b%"name"]=>
113      %unicode|string%(9) "file2.txt"
114      [%u|b%"tmp_name"]=>
115      %unicode|string%(%d) "%s"
116      [%u|b%"error"]=>
117      int(0)
118      [%u|b%"done"]=>
119      bool(true)
120      [%u|b%"start_time"]=>
121      int(%d)
122      [%u|b%"bytes_processed"]=>
123      int(1)
124    }
125  }
126}
127