1--TEST--
2Test ini_set() for session : basic functionality
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--INI--
6session.save_path=
7session.name="PHPSESSID"
8session.save_handler="files"
9session.auto_start="0"
10session.gc_probability="1"
11session.gc_divisor="100"
12session.gc_maxlifetime="1440"
13session.serialize_handler="php"
14session.cookie_path="/"
15session.cookie_domain=""
16session.cookie_secure="0"
17session.cookie_httponly="0"
18session.use_cookies="1"
19session.use_only_cookies="1"
20session.use_strict_mode="0"
21session.referer_check=""
22session.cache_limiter="nocache"
23session.cache_expire="180"
24session.use_trans_sid="0"
25session.sid_length="32"
26session.sid_bits_per_character="4"
27session.lazy_write="1"
28--FILE--
29<?php
30ob_start();
31
32/*
33 * Prototype : string ini_set(string $name, string $value)
34 * Description : Set session ini
35 * Source code : ext/session/session.c
36 */
37
38echo "*** Testing ini_set() for session ini: basic functionality ***\n";
39
40var_dump(ini_set("session.save_path", ""));
41var_dump(ini_set("session.name", "PHPSESSID"));
42var_dump(ini_set("session.save_handler", "files"));
43var_dump(ini_set("session.auto_start", "0"));
44var_dump(ini_set("session.gc_probability", "1"));
45var_dump(ini_set("session.gc_divisor", "100"));
46var_dump(ini_set("session.gc_maxlifetime", "1440"));
47var_dump(ini_set("session.serialize_handler", "php"));
48var_dump(ini_set("session.cookie_path", "/"));
49var_dump(ini_set("session.cookie_domain", ""));
50var_dump(ini_set("session.cookie_secure", "0"));
51var_dump(ini_set("session.cookie_httponly", "0"));
52var_dump(ini_set("session.use_cookies", "1"));
53var_dump(ini_set("session.use_only_cookies", "1"));
54var_dump(ini_set("session.use_strict_mode", "0"));
55var_dump(ini_set("session.referer_check", ""));
56var_dump(ini_set("session.cache_limiter", "nocache"));
57var_dump(ini_set("session.cache_expire", "180"));
58var_dump(ini_set("session.use_trans_sid", "0"));
59var_dump(ini_set("session.sid_length", "32"));
60var_dump(ini_set("session.sid_bits_per_character", "4"));
61var_dump(ini_set("session.lazy_write", "1"));
62
63session_start();
64var_dump("session started");
65
66var_dump(ini_set("session.save_path", ""));
67var_dump(ini_set("session.name", "PHPSESSID"));
68var_dump(ini_set("session.save_handler", "files"));
69var_dump(ini_set("session.auto_start", "0"));
70var_dump(ini_set("session.gc_probability", "1"));
71var_dump(ini_set("session.gc_divisor", "100"));
72var_dump(ini_set("session.gc_maxlifetime", "1440"));
73var_dump(ini_set("session.serialize_handler", "php"));
74var_dump(ini_set("session.cookie_path", "/"));
75var_dump(ini_set("session.cookie_domain", ""));
76var_dump(ini_set("session.cookie_secure", "0"));
77var_dump(ini_set("session.cookie_httponly", "0"));
78var_dump(ini_set("session.use_cookies", "1"));
79var_dump(ini_set("session.use_only_cookies", "1"));
80var_dump(ini_set("session.use_strict_mode", "0"));
81var_dump(ini_set("session.referer_check", ""));
82var_dump(ini_set("session.cache_limiter", "nocache"));
83var_dump(ini_set("session.cache_expire", "180"));
84var_dump(ini_set("session.use_trans_sid", "0"));
85var_dump(ini_set("session.sid_length", "32"));
86var_dump(ini_set("session.sid_bits_per_character", "4"));
87var_dump(ini_set("session.lazy_write", "1"));
88
89
90echo "Done";
91ob_end_flush();
92?>
93--EXPECTF--
94*** Testing ini_set() for session ini: basic functionality ***
95string(0) ""
96string(9) "PHPSESSID"
97string(5) "files"
98bool(false)
99string(1) "1"
100string(3) "100"
101string(4) "1440"
102string(3) "php"
103string(1) "/"
104string(0) ""
105string(1) "0"
106string(1) "0"
107string(1) "1"
108string(1) "1"
109string(1) "0"
110string(0) ""
111string(7) "nocache"
112string(3) "180"
113string(1) "0"
114string(2) "32"
115string(1) "4"
116string(1) "1"
117string(15) "session started"
118
119Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
120bool(false)
121
122Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
123bool(false)
124
125Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
126bool(false)
127bool(false)
128
129Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
130bool(false)
131
132Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
133bool(false)
134
135Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
136bool(false)
137
138Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
139bool(false)
140
141Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
142bool(false)
143
144Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
145bool(false)
146
147Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
148bool(false)
149
150Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
151bool(false)
152
153Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
154bool(false)
155
156Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
157bool(false)
158
159Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
160bool(false)
161
162Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
163bool(false)
164
165Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
166bool(false)
167
168Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
169bool(false)
170
171Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
172bool(false)
173
174Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
175bool(false)
176
177Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
178bool(false)
179
180Warning: ini_set(): Session ini settings cannot be changed when a session is active in %s on line %d
181bool(false)
182Done
183