1--TEST--
2Test session_set_cookie_params() function : variation
3--INI--
4session.cookie_secure=TRUE
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_secure"));
15var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE));
16var_dump(ini_get("session.cookie_secure"));
17var_dump(session_start());
18var_dump(ini_get("session.cookie_secure"));
19var_dump(session_set_cookie_params(3600, "/path", "blah", TRUE));
20var_dump(ini_get("session.cookie_secure"));
21var_dump(session_destroy());
22var_dump(ini_get("session.cookie_secure"));
23var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE));
24var_dump(ini_get("session.cookie_secure"));
25
26echo "Done";
27ob_end_flush();
28?>
29--EXPECTF--
30*** Testing session_set_cookie_params() : variation ***
31string(1) "1"
32bool(true)
33string(1) "0"
34bool(true)
35string(1) "0"
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(1) "0"
40bool(true)
41string(1) "0"
42bool(true)
43string(1) "0"
44Done
45