open_basedir_is_file.phpt 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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_file");
  9. ?>
  10. --CLEAN--
  11. <?php
  12. require_once "open_basedir.inc";
  13. delete_directories();
  14. ?>
  15. --EXPECTF--
  16. *** Testing open_basedir configuration [is_file] ***
  17. bool(true)
  18. bool(true)
  19. bool(true)
  20. bool(true)
  21. bool(true)
  22. Warning: is_file(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
  23. bool(false)
  24. Warning: is_file(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
  25. bool(false)
  26. Warning: is_file(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
  27. bool(false)
  28. Warning: is_file(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
  29. bool(false)
  30. Warning: is_file(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
  31. bool(false)
  32. Warning: is_file(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
  33. bool(false)
  34. Warning: is_file(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
  35. bool(false)
  36. Warning: is_file(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
  37. bool(false)
  38. Warning: is_file(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
  39. bool(false)
  40. bool(false)
  41. bool(true)
  42. bool(true)
  43. bool(true)
  44. bool(true)
  45. *** Finished testing open_basedir configuration [is_file] ***