rfc1867_sid_cookie.phpt 3.0 KB

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