1--TEST--
2Test session_set_cookie_params() function : variation
3--INI--
4session.cookie_path=/path
5--SKIPIF--
6<?php include('skipif.inc'); ?>
7--FILE--
8<?php
9
10ob_start();
11
12echo "*** Testing session_set_cookie_params() : variation ***\n";
13
14var_dump(ini_get("session.cookie_path"));
15var_dump(session_set_cookie_params(3600, "/foo"));
16var_dump(ini_get("session.cookie_path"));
17var_dump(session_start());
18var_dump(ini_get("session.cookie_path"));
19var_dump(session_set_cookie_params(3600, "/blah"));
20var_dump(ini_get("session.cookie_path"));
21var_dump(session_destroy());
22var_dump(ini_get("session.cookie_path"));
23var_dump(session_set_cookie_params(3600, "/guff"));
24var_dump(ini_get("session.cookie_path"));
25
26echo "Done";
27ob_end_flush();
28?>
29--EXPECTF--
30*** Testing session_set_cookie_params() : variation ***
31string(5) "/path"
32bool(true)
33string(4) "/foo"
34bool(true)
35string(4) "/foo"
36
37Warning: session_set_cookie_params(): Session cookie parameters cannot be changed when a session is active in %s on line %d
38bool(false)
39string(4) "/foo"
40bool(true)
41string(4) "/foo"
42bool(true)
43string(5) "/guff"
44Done
45