rfc1867_sid_get.phpt 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. --TEST--
  2. session rfc1867 sid get
  3. --INI--
  4. file_uploads=1
  5. upload_max_filesize=1024
  6. session.save_path=
  7. session.name=PHPSESSID
  8. session.use_strict_mode=0
  9. session.use_cookies=1
  10. session.use_only_cookies=0
  11. session.upload_progress.enabled=1
  12. session.upload_progress.cleanup=0
  13. session.upload_progress.prefix=upload_progress_
  14. session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
  15. session.upload_progress.freq=0
  16. session.save_handler=files
  17. --EXTENSIONS--
  18. session
  19. --SKIPIF--
  20. <?php include('skipif.inc'); ?>
  21. --GET--
  22. PHPSESSID=rfc1867-sid-get
  23. --POST_RAW--
  24. Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
  25. -----------------------------20896060251896012921717172737
  26. Content-Disposition: form-data; name="PHPSESSID"
  27. rfc1867-sid-get-post
  28. -----------------------------20896060251896012921717172737
  29. Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
  30. rfc1867_sid_get.php
  31. -----------------------------20896060251896012921717172737
  32. Content-Disposition: form-data; name="file1"; filename="file1.txt"
  33. 1
  34. -----------------------------20896060251896012921717172737
  35. Content-Disposition: form-data; name="file2"; filename="file2.txt"
  36. 2
  37. -----------------------------20896060251896012921717172737--
  38. --FILE--
  39. <?php
  40. session_start();
  41. var_dump(session_id());
  42. var_dump(basename(__FILE__) == $_POST[ini_get("session.upload_progress.name")]);
  43. var_dump($_FILES);
  44. var_dump($_SESSION["upload_progress_" . basename(__FILE__)]);
  45. session_destroy();
  46. ?>
  47. --EXPECTF--
  48. string(%d) "rfc1867-sid-get"
  49. bool(true)
  50. array(2) {
  51. ["file1"]=>
  52. array(6) {
  53. ["name"]=>
  54. string(9) "file1.txt"
  55. ["full_path"]=>
  56. string(9) "file1.txt"
  57. ["type"]=>
  58. string(0) ""
  59. ["tmp_name"]=>
  60. string(%d) "%s"
  61. ["error"]=>
  62. int(0)
  63. ["size"]=>
  64. int(1)
  65. }
  66. ["file2"]=>
  67. array(6) {
  68. ["name"]=>
  69. string(9) "file2.txt"
  70. ["full_path"]=>
  71. string(9) "file2.txt"
  72. ["type"]=>
  73. string(0) ""
  74. ["tmp_name"]=>
  75. string(%d) "%s"
  76. ["error"]=>
  77. int(0)
  78. ["size"]=>
  79. int(1)
  80. }
  81. }
  82. array(5) {
  83. ["start_time"]=>
  84. int(%d)
  85. ["content_length"]=>
  86. int(%d)
  87. ["bytes_processed"]=>
  88. int(%d)
  89. ["done"]=>
  90. bool(true)
  91. ["files"]=>
  92. array(2) {
  93. [0]=>
  94. array(7) {
  95. ["field_name"]=>
  96. string(5) "file1"
  97. ["name"]=>
  98. string(9) "file1.txt"
  99. ["tmp_name"]=>
  100. string(%d) "%s"
  101. ["error"]=>
  102. int(0)
  103. ["done"]=>
  104. bool(true)
  105. ["start_time"]=>
  106. int(%d)
  107. ["bytes_processed"]=>
  108. int(1)
  109. }
  110. [1]=>
  111. array(7) {
  112. ["field_name"]=>
  113. string(5) "file2"
  114. ["name"]=>
  115. string(9) "file2.txt"
  116. ["tmp_name"]=>
  117. string(%d) "%s"
  118. ["error"]=>
  119. int(0)
  120. ["done"]=>
  121. bool(true)
  122. ["start_time"]=>
  123. int(%d)
  124. ["bytes_processed"]=>
  125. int(1)
  126. }
  127. }
  128. }