1--TEST--
2Test session_save_path() function : variation
3--EXTENSIONS--
4session
5--SKIPIF--
6<?php include('skipif.inc');
7if(substr(PHP_OS, 0, 3) == "WIN")
8    die("skip Not for Windows");
9?>
10--INI--
11session.save_handler=files
12session.save_path=
13session.name=PHPSESSID
14--FILE--
15<?php
16
17ob_start();
18echo "*** Testing session_save_path() : variation ***\n";
19$directory = __DIR__;
20$sessions = ($directory."/session_save_path_variation5");
21
22chdir($directory);
23ini_set('open_basedir', '.');
24// Delete the existing directory
25if (file_exists($sessions) === TRUE) {
26    @rmdir($sessions);
27}
28
29var_dump(mkdir($sessions));
30var_dump(chdir($sessions));
31ini_set('open_basedir', '.');
32ini_set("session.save_path", $directory);
33var_dump(session_save_path());
34
35echo "Done";
36ob_end_flush();
37?>
38--CLEAN--
39<?php
40$directory = __DIR__;
41$sessions = ($directory."/session_save_path_variation5");
42rmdir($sessions);
43?>
44--EXPECTF--
45*** Testing session_save_path() : variation ***
46bool(true)
47bool(true)
48
49Warning: ini_set(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (%ssession_save_path_variation5) in %s on line %d
50string(0) ""
51Done
52