xref: /PHP-5.5/ext/curl/tests/bug61948-win32.phpt (revision 71ebc0a7)
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 Linux");
7?>
8--INI--
9open_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
20bool(true)
21
22Warning: 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
23bool(false)
24