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=0 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 19--SKIPIF-- 20<?php include('skipif.inc'); ?> 21--COOKIE-- 22PHPSESSID=rfc1867-tests 23--GET-- 24PHPSESSID=rfc1867-tests-get 25--POST_RAW-- 26Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 27-----------------------------20896060251896012921717172737 28Content-Disposition: form-data; name="PHPSESSID" 29 30rfc1867-tests-post 31-----------------------------20896060251896012921717172737 32Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS" 33 34rfc1867.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-tests" 55bool(true) 56array(2) { 57 [%u|b%"file1"]=> 58 array(5) { 59 [%u|b%"name"]=> 60 %string|unicode%(9) "file1.txt" 61 [%u|b%"type"]=> 62 %string|unicode%(0) "" 63 [%u|b%"tmp_name"]=> 64 %string|unicode%(%d) "%s" 65 [%u|b%"error"]=> 66 int(0) 67 [%u|b%"size"]=> 68 int(1) 69 } 70 [%u|b%"file2"]=> 71 array(5) { 72 [%u|b%"name"]=> 73 %string|unicode%(9) "file2.txt" 74 [%u|b%"type"]=> 75 %string|unicode%(0) "" 76 [%u|b%"tmp_name"]=> 77 %string|unicode%(%d) "%s" 78 [%u|b%"error"]=> 79 int(0) 80 [%u|b%"size"]=> 81 int(1) 82 } 83} 84array(5) { 85 [%u|b%"start_time"]=> 86 int(%d) 87 [%u|b%"content_length"]=> 88 int(%d) 89 [%u|b%"bytes_processed"]=> 90 int(%d) 91 [%u|b%"done"]=> 92 bool(true) 93 [%u|b%"files"]=> 94 array(2) { 95 [0]=> 96 array(7) { 97 [%u|b%"field_name"]=> 98 %unicode|string%(5) "file1" 99 [%u|b%"name"]=> 100 %unicode|string%(9) "file1.txt" 101 [%u|b%"tmp_name"]=> 102 %unicode|string%(%d) "%s" 103 [%u|b%"error"]=> 104 int(0) 105 [%u|b%"done"]=> 106 bool(true) 107 [%u|b%"start_time"]=> 108 int(%d) 109 [%u|b%"bytes_processed"]=> 110 int(1) 111 } 112 [1]=> 113 array(7) { 114 [%u|b%"field_name"]=> 115 %unicode|string%(5) "file2" 116 [%u|b%"name"]=> 117 %unicode|string%(9) "file2.txt" 118 [%u|b%"tmp_name"]=> 119 %unicode|string%(%d) "%s" 120 [%u|b%"error"]=> 121 int(0) 122 [%u|b%"done"]=> 123 bool(true) 124 [%u|b%"start_time"]=> 125 int(%d) 126 [%u|b%"bytes_processed"]=> 127 int(1) 128 } 129 } 130} 131