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