1--TEST--
2Test session_set_save_handler() function : variation
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--INI--
6session.auto_start=1
7--FILE--
8<?php
9
10ob_start();
11
12/*
13 * Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
14 * Description : Sets user-level session storage functions
15 * Source code : ext/session/session.c
16 */
17
18echo "*** Testing session_set_save_handler() : variation ***\n";
19
20require_once "save_handler.inc";
21$path = dirname(__FILE__);
22var_dump(session_status());
23session_save_path($path);
24var_dump(session_set_save_handler("open", "close", "read", "write", "destroy", "gc"));
25var_dump(session_destroy());
26
27ob_end_flush();
28?>
29--EXPECTF--
30*** Testing session_set_save_handler() : variation ***
31int(2)
32
33Warning: session_save_path(): Cannot change save path when session is active in %s on line 16
34
35Warning: session_set_save_handler(): Cannot change save handler when session is active in %s on line 17
36bool(false)
37bool(true)
38