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