summaryrefslogtreecommitdiff
path: root/ext/curl
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-12-04 17:28:43 +0100
committerAnatol Belski <ab@php.net>2016-12-04 17:28:43 +0100
commit8e209d043559a7d60bea50fcac23bfa87b3015d7 (patch)
treecdd14fd4a26a4edbba76920d589ef3217365837d /ext/curl
parent10a2ceef3bfada85e7046231476d06f08d3de69c (diff)
downloadphp-git-8e209d043559a7d60bea50fcac23bfa87b3015d7.tar.gz
fix test
Diffstat (limited to 'ext/curl')
-rw-r--r--ext/curl/tests/bug61948-win32.phpt17
1 files changed, 13 insertions, 4 deletions
diff --git a/ext/curl/tests/bug61948-win32.phpt b/ext/curl/tests/bug61948-win32.phpt
index 00f498f910..b91ccb7815 100644
--- a/ext/curl/tests/bug61948-win32.phpt
+++ b/ext/curl/tests/bug61948-win32.phpt
@@ -5,19 +5,28 @@ Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
if(substr(PHP_OS, 0, 3) != 'WIN' )
die("skip Not Valid for Linux");
?>
---INI--
-open_basedir="c:/tmp"
--FILE--
<?php
+ $base_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug61948";
+ mkdir($base_dir . DIRECTORY_SEPARATOR . "foo", 0755, true);
+
+ ini_set("open_basedir", $base_dir);
+
$ch = curl_init();
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
- var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/tmp/foo"));
+ var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "$base_dir/foo"));
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/xxx/bar"));
curl_close($ch);
?>
+--CLEAN--
+<?php
+ $base_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug61948";
+ rmdir("$base_dir/foo");
+ rmdir($base_dir);
+?>
--EXPECTF--
%a
bool(true)
-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
+Warning: curl_setopt(): open_basedir restriction in effect. File(c:/xxx/bar) is not within the allowed path(s): (%sbug61948) in %sbug61948-win32.php on line %d
bool(false)