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