1--TEST-- 2Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction) 3--SKIPIF-- 4<?php if (!extension_loaded("curl")) print "skip"; 5if(substr(PHP_OS, 0, 3) == 'WIN' ) 6 die("skip Not Valid for Windows"); 7?> 8--INI-- 9open_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-- 19bool(true) 20bool(true) 21 22Warning: 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 23bool(false) 24