1--TEST--
2Test open_basedir configuration
3--INI--
4open_basedir=.
5--FILE--
6<?php
7require_once "open_basedir.inc";
8$initdir = getcwd();
9test_open_basedir_before("disk_free_space");
10test_open_basedir_error("disk_free_space");
11
12var_dump(disk_free_space($initdir."/test/ok"));
13test_open_basedir_after("disk_free_space");
14?>
15--CLEAN--
16<?php
17require_once "open_basedir.inc";
18delete_directories();
19?>
20--EXPECTF--
21*** Testing open_basedir configuration [disk_free_space] ***
22bool(true)
23bool(true)
24bool(true)
25bool(true)
26bool(true)
27
28Warning: disk_free_space(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
29bool(false)
30
31Warning: disk_free_space(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
32bool(false)
33
34Warning: disk_free_space(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
35bool(false)
36
37Warning: disk_free_space(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
38bool(false)
39
40Warning: disk_free_space(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
41bool(false)
42
43Warning: disk_free_space(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
44bool(false)
45
46Warning: disk_free_space(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
47bool(false)
48
49Warning: disk_free_space(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
50bool(false)
51float(%s)
52*** Finished testing open_basedir configuration [disk_free_space] ***
53