1--TEST--
2Test session_set_cookie_params() function : variation
3--INI--
4session.cookie_httponly=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_httponly"));
15var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE, FALSE));
16var_dump(ini_get("session.cookie_httponly"));
17var_dump(session_start());
18var_dump(ini_get("session.cookie_httponly"));
19var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE, TRUE));
20var_dump(ini_get("session.cookie_httponly"));
21var_dump(session_destroy());
22var_dump(ini_get("session.cookie_httponly"));
23var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE, FALSE));
24var_dump(ini_get("session.cookie_httponly"));
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