summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoliy Belsky <ab@php.net>2012-03-28 19:32:24 +0200
committerAnatoliy Belsky <ab@php.net>2012-03-28 19:32:24 +0200
commit92bca7436fe00f3eb3230f8d42dd2f2b3016574b (patch)
tree6cd815971f41f869fb0a16f608486b23ad3bfc14
parentfa0d507923b8dc07ff91576121543b18549dda3a (diff)
parenteeab3be3037e2c537393f630b496017c9f888736 (diff)
downloadphp-git-92bca7436fe00f3eb3230f8d42dd2f2b3016574b.tar.gz
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: Fix bug #61459 popen_close_basic-win32 can't run sort.exe
-rw-r--r--ext/standard/tests/file/popen_pclose_basic-win32.phpt13
1 files changed, 12 insertions, 1 deletions
diff --git a/ext/standard/tests/file/popen_pclose_basic-win32.phpt b/ext/standard/tests/file/popen_pclose_basic-win32.phpt
index 8c2ba4252d..b5c72560d8 100644
--- a/ext/standard/tests/file/popen_pclose_basic-win32.phpt
+++ b/ext/standard/tests/file/popen_pclose_basic-win32.phpt
@@ -28,7 +28,18 @@ pclose($file_handle);
echo "*** Testing popen(): writing to the pipe ***\n";
$arr = array("ggg", "ddd", "aaa", "sss");
-$file_handle = popen("sort", "w");
+// popen("sort", "w") fails if variables_order="GPCS"
+// this is set in the default INI file
+// it doesn't seem to be changeable in the --INI-- section
+// also, doing: ini_set('variables_order', ''); doesn't work!
+//
+// the only solution is to either put the absolute path here, or
+// remove variables_order= from PHP.ini (setting it in run-test's
+// default INI will fail too)
+//
+// since we can't depend on PHP.ini being set a certain way,
+// have to put the absolute path here.
+$file_handle = popen("/windows/system32/sort", "w");
$newline = "\n";
foreach($arr as $str) {
fwrite($file_handle, (binary)$str);