rfc1867_inter.phpt 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. --TEST--
  2. session rfc1867
  3. --INI--
  4. file_uploads=1
  5. error_reporting=E_ALL&~E_NOTICE
  6. comment=debug builds show some additional E_NOTICE errors
  7. upload_max_filesize=1024
  8. session.save_path=
  9. session.name=PHPSESSID
  10. session.use_strict_mode=0
  11. session.use_cookies=1
  12. session.use_only_cookies=0
  13. session.upload_progress.enabled=1
  14. session.upload_progress.cleanup=0
  15. session.upload_progress.prefix=upload_progress_
  16. session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
  17. session.upload_progress.freq=1%
  18. session.upload_progress.min_freq=0.000000001
  19. --SKIPIF--
  20. <?php include('skipif.inc'); ?>
  21. --COOKIE--
  22. PHPSESSID=rfc1867-tests
  23. --GET--
  24. PHPSESSID=rfc1867-tests-get
  25. --POST_RAW--
  26. Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
  27. -----------------------------20896060251896012921717172737
  28. Content-Disposition: form-data; name="PHPSESSID"
  29. rfc1867-tests-post
  30. -----------------------------20896060251896012921717172737
  31. Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
  32. rfc1867_inter.php_1
  33. -----------------------------20896060251896012921717172737
  34. Content-Disposition: form-data; name="file1"; filename="file1.txt"
  35. 1
  36. -----------------------------20896060251896012921717172737
  37. Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
  38. rfc1867_inter.php_2
  39. -----------------------------20896060251896012921717172737
  40. Content-Disposition: form-data; name="file2"; filename="file2.txt"
  41. 2
  42. -----------------------------20896060251896012921717172737--
  43. --FILE--
  44. <?php
  45. session_start();
  46. var_dump(session_id());
  47. var_dump($_FILES);
  48. var_dump($_SESSION["upload_progress_" . basename(__FILE__) . "_1"]);
  49. var_dump($_SESSION["upload_progress_" . basename(__FILE__) . "_2"]);
  50. session_destroy();
  51. ?>
  52. --EXPECTF--
  53. string(%d) "rfc1867-tests"
  54. array(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. }
  82. array(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. NULL