session_basic4.phpt 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --TEST--
  2. Test basic function : variation4 use_trans_sid
  3. --INI--
  4. session.use_strict_mode=0
  5. session.use_only_cookies=0
  6. session.use_trans_sid=1
  7. session.save_handler=files
  8. session.hash_bits_per_character=4
  9. session.hash_function=0
  10. session.gc_probability=1
  11. session.gc_divisor=1000
  12. session.gc_maxlifetime=300
  13. session.save_path=
  14. session.name=PHPSESSID
  15. session.trans_sid_tags="a=href,area=href,frame=src,form="
  16. url_rewriter.tags="a=href,area=href,frame=src,form="
  17. --EXTENSIONS--
  18. session
  19. --SKIPIF--
  20. <?php include('skipif.inc'); ?>
  21. --FILE--
  22. <?php
  23. ob_start();
  24. echo "*** Testing basic session functionality : variation4 use_trans_sid ***\n";
  25. echo "*** Test trans sid ***\n";
  26. output_add_rewrite_var('testvar1','testvalue1');
  27. session_id('test1');
  28. session_start();
  29. echo '
  30. <a href="/">
  31. <form action="" method="post">
  32. </form>
  33. ';
  34. session_commit();
  35. output_add_rewrite_var('testvar2','testvalue2');
  36. session_id('test2');
  37. session_start();
  38. echo '
  39. <a href="/">
  40. <form action="" method="post">
  41. </form>
  42. ';
  43. ?>
  44. --EXPECT--
  45. *** Testing basic session functionality : variation4 use_trans_sid ***
  46. *** Test trans sid ***
  47. <a href="/?PHPSESSID=test2&testvar1=testvalue1&testvar2=testvalue2">
  48. <form action="" method="post"><input type="hidden" name="testvar1" value="testvalue1" /><input type="hidden" name="testvar2" value="testvalue2" /><input type="hidden" name="PHPSESSID" value="test2" />
  49. </form>
  50. <a href="/?PHPSESSID=test2&testvar1=testvalue1&testvar2=testvalue2">
  51. <form action="" method="post"><input type="hidden" name="testvar1" value="testvalue1" /><input type="hidden" name="testvar2" value="testvalue2" /><input type="hidden" name="PHPSESSID" value="test2" />
  52. </form>