1--TEST--
2Test session_set_save_handler() function : error functionality
3--INI--
4session.save_path=
5session.name=PHPSESSID
6session.save_handler=files
7--EXTENSIONS--
8session
9--FILE--
10<?php
11
12ob_start();
13
14echo "*** Testing session_set_save_handler() : error functionality ***\n";
15function open($save_path, $session_name) {
16     throw new Exception("Do something bad..!");
17}
18
19function close() { return true; }
20function read($id) { return false; }
21function write($id, $session_data) { }
22function destroy($id) {  return true; }
23function gc($maxlifetime) {  return true; }
24
25session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
26session_start();
27ob_end_flush();
28?>
29--EXPECTF--
30*** Testing session_set_save_handler() : error functionality ***
31
32Deprecated: session_set_save_handler(): Providing individual callbacks instead of an object implementing SessionHandlerInterface is deprecated in %s on line %d
33
34Fatal error: Uncaught Exception: Do something bad..! in %s:%d
35Stack trace:
36#0 [internal function]: open('', 'PHPSESSID')
37#1 %s(%d): session_start()
38#2 {main}
39  thrown in %s on line %d
40