bug61948-win32.phpt 677 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
  3. --SKIPIF--
  4. <?php if (!extension_loaded("curl")) print "skip";
  5. if(substr(PHP_OS, 0, 3) != 'WIN' )
  6. die("skip Not Valid for Linux");
  7. ?>
  8. --INI--
  9. open_basedir="c:/tmp"
  10. --FILE--
  11. <?php
  12. $ch = curl_init();
  13. var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
  14. var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/tmp/foo"));
  15. var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/xxx/bar"));
  16. curl_close($ch);
  17. ?>
  18. --EXPECTF--
  19. %a
  20. bool(true)
  21. Warning: curl_setopt(): open_basedir restriction in effect. File(c:/xxx/bar) is not within the allowed path(s): (c:/tmp) in %sbug61948-win32.php on line %d
  22. bool(false)