File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / security / open_basedir_is_writable.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 4 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>