summaryrefslogtreecommitdiff
path: root/ext/session/tests/session_set_save_handler_variation3.phpt
blob: 50fa6f62e05de1fa02c2310b290368a5eda5b57e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
Test session_set_save_handler() function : variation
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
session.auto_start=1
--FILE--
<?php

ob_start();

echo "*** Testing session_set_save_handler() : variation ***\n";

require_once "save_handler.inc";
$path = __DIR__;
var_dump(session_status());
session_save_path($path);
var_dump(session_set_save_handler("open", "close", "read", "write", "destroy", "gc"));
var_dump(session_destroy());

ob_end_flush();
?>
--EXPECTF--
*** Testing session_set_save_handler() : variation ***
int(2)

Warning: session_save_path(): Cannot change save path when session is active in %s on line %d

Warning: session_set_save_handler(): Cannot change save handler when session is active in %s on line %d
bool(false)
bool(true)