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