Annotation of embedaddon/php/ext/curl/tests/bug61948.phpt, revision 1.1
1.1 ! misho 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 Windows");
! 7: ?>
! 8: --INI--
! 9: open_basedir="/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, "/tmp/foo"));
! 15: var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/xxx/bar"));
! 16: curl_close($ch);
! 17: ?>
! 18: --EXPECTF--
! 19: bool(true)
! 20: bool(true)
! 21:
! 22: Warning: curl_setopt(): open_basedir restriction in effect. File(/xxx/bar) is not within the allowed path(s): (/tmp) in %sbug61948.php on line %d
! 23: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>