rfc1867_sid_get.phpt 3.0 KB

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