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