bug53226.phpt 598 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Bug #53226 (file_exists fails on big filenames)
  3. --INI--
  4. open_basedir=.
  5. --FILE--
  6. <?php
  7. require_once "open_basedir.inc";
  8. create_directories();
  9. var_dump(file_exists('./test/ok/ok.txt'));
  10. var_dump(file_exists('./test/foo'));
  11. $file = str_repeat('x', 2 * PHP_MAXPATHLEN);
  12. var_dump(file_exists("./test/$file"));
  13. ?>
  14. --CLEAN--
  15. <?php
  16. require_once "open_basedir.inc";
  17. delete_directories();
  18. ?>
  19. --EXPECTF--
  20. bool(true)
  21. bool(true)
  22. bool(true)
  23. bool(true)
  24. bool(false)
  25. Warning: file_exists(): File name is longer than the maximum allowed path length on this platform (%d): %s in %s on line %d
  26. bool(false)