1--TEST--
2session rfc1867
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=1
15session.upload_progress.prefix=upload_progress_
16session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
17session.upload_progress.freq=1%
18session.upload_progress.min_freq=0.000000001
19session.save_handler=files
20--SKIPIF--
21<?php include('skipif.inc'); ?>
22--COOKIE--
23PHPSESSID=rfc1867-tests
24--GET--
25PHPSESSID=rfc1867-tests-get
26--POST_RAW--
27Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
28-----------------------------20896060251896012921717172737
29Content-Disposition: form-data; name="PHPSESSID"
30
31rfc1867-tests-post
32-----------------------------20896060251896012921717172737
33Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
34
35rfc1867_cleanup.php
36-----------------------------20896060251896012921717172737
37Content-Disposition: form-data; name="file1"; filename="file1.txt"
38
391
40-----------------------------20896060251896012921717172737
41Content-Disposition: form-data; name="file2"; filename="file2.txt"
42
432
44-----------------------------20896060251896012921717172737--
45--FILE--
46<?php
47session_start();
48var_dump(session_id());
49var_dump(basename(__FILE__) == $_POST[ini_get("session.upload_progress.name")]);
50var_dump($_FILES);
51var_dump($_SESSION["upload_progress_" . basename(__FILE__)]);
52session_destroy();
53?>
54--EXPECTF--
55string(%d) "rfc1867-tests"
56bool(true)
57array(2) {
58  [%u|b%"file1"]=>
59  array(5) {
60    [%u|b%"name"]=>
61    %string|unicode%(9) "file1.txt"
62    [%u|b%"type"]=>
63    %string|unicode%(0) ""
64    [%u|b%"tmp_name"]=>
65    %string|unicode%(%d) "%s"
66    [%u|b%"error"]=>
67    int(0)
68    [%u|b%"size"]=>
69    int(1)
70  }
71  [%u|b%"file2"]=>
72  array(5) {
73    [%u|b%"name"]=>
74    %string|unicode%(9) "file2.txt"
75    [%u|b%"type"]=>
76    %string|unicode%(0) ""
77    [%u|b%"tmp_name"]=>
78    %string|unicode%(%d) "%s"
79    [%u|b%"error"]=>
80    int(0)
81    [%u|b%"size"]=>
82    int(1)
83  }
84}
85NULL
86