1--TEST--
2Test session_save_path() function : variation
3--EXTENSIONS--
4session
5--SKIPIF--
6<?php include('skipif.inc');?>
7--INI--
8open_basedir=.
9session.save_handler=files
10session.save_path=
11session.name=PHPSESSID
12--FILE--
13<?php
14
15ob_start();
16
17echo "*** Testing session_save_path() : variation ***\n";
18$initdir = __DIR__;
19$sessions = ($initdir."/session_save_path_variation4");
20
21chdir($initdir);
22
23// Delete the existing directory
24if (file_exists($sessions) === TRUE) {
25    @rmdir($sessions);
26}
27
28var_dump(mkdir($sessions));
29var_dump(chdir($sessions));
30ini_set("session.save_path", $initdir);
31var_dump(session_save_path());
32var_dump(session_start());
33var_dump(session_save_path());
34var_dump(session_destroy());
35var_dump(session_save_path());
36
37echo "Done";
38ob_end_flush();
39?>
40--CLEAN--
41<?php
42$initdir = __DIR__;
43$sessions = ($initdir."/session_save_path_variation4");
44rmdir($sessions);
45?>
46--EXPECTF--
47*** Testing session_save_path() : variation ***
48bool(true)
49bool(true)
50
51Warning: ini_set(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (.) in %s on line %d
52string(0) ""
53
54Warning: session_start(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (.) in %s on line %d
55
56Warning: session_start(): Failed to initialize storage module: files (path: ) in %s on line %d
57bool(false)
58string(0) ""
59
60Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
61bool(false)
62string(0) ""
63Done
64