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