diff options
| author | Ant Phillips <ant@php.net> | 2008-04-24 16:40:53 +0000 |
|---|---|---|
| committer | Ant Phillips <ant@php.net> | 2008-04-24 16:40:53 +0000 |
| commit | 0ccb772f100ef356814b418a8b809a5c42d600ed (patch) | |
| tree | 5755bd051a10cb3072ded0b93dca9a9e39773fe3 /ext | |
| parent | 138a1160ab90194e3edf421a7ee7f79a8ce312c9 (diff) | |
| download | php-git-0ccb772f100ef356814b418a8b809a5c42d600ed.tar.gz | |
Extra open_basedir tests
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/standard/tests/file/open_basedir_copy_variation1.phpt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ext/standard/tests/file/open_basedir_copy_variation1.phpt b/ext/standard/tests/file/open_basedir_copy_variation1.phpt new file mode 100644 index 0000000000..de532e12cb --- /dev/null +++ b/ext/standard/tests/file/open_basedir_copy_variation1.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test open_basedir configuration +--INI-- +open_basedir=. +--FILE-- +<?php +require_once "open_basedir.inc"; +test_open_basedir_before("copy"); +$directory = dirname(__FILE__); + +var_dump(copy("../bad/bad.txt", "copy.txt")); +var_dump(unlink("copy.txt")); + +test_open_basedir_after("copy"); +?> +--CLEAN-- +<?php +require_once "open_basedir.inc"; +delete_directories(); +?> +--EXPECTF-- +*** Testing open_basedir configuration [copy] *** +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) + +Warning: copy(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d +bool(false) + +Warning: unlink(copy.txt): No such file or directory in %s on line %d +bool(false) +*** Finished testing open_basedir configuration [copy] *** + |
