1--TEST--
2Test open_basedir configuration
3--INI--
4open_basedir=.
5--FILE--
6<?php
7require_once "open_basedir.inc";
8test_open_basedir_before("copy");
9
10var_dump(copy("../bad/bad.txt", "copy.txt"));
11var_dump(unlink("copy.txt"));
12
13test_open_basedir_after("copy");
14?>
15--CLEAN--
16<?php
17require_once "open_basedir.inc";
18delete_directories();
19?>
20--EXPECTF--
21*** Testing open_basedir configuration [copy] ***
22bool(true)
23bool(true)
24bool(true)
25bool(true)
26bool(true)
27
28Warning: copy(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
29bool(false)
30
31Warning: unlink(copy.txt): No such file or directory in %s on line %d
32bool(false)
33*** Finished testing open_basedir configuration [copy] ***
34