com php-src: Fix bug #61459 popen_close_basic-win32 c an't run sort.exe: ext/standard/tests/file/popen_ pclose_basic-win32.phpt
| From: | Anatoliy Belsky | Date: | Wed, 28 Mar 2012 17:25:29 +0000 |
| Subject: | com php-src: Fix bug #61459 popen_close_basic-win32 c an't run sort.exe: ext/standard/tests/file/popen_ pclose_basic-win32.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-68229@lists.php.net to get a copy of this message | ||
Commit: eeab3be3037e2c537393f630b496017c9f888736
Author: Anatoliy Belsky <point@php-dev-dell.(none)> Wed, 28 Mar 2012 19:25:29 +0200
Parents: bff8152565375c863f67833b73e2629c4d50cf63
Branches: PHP-5.3 PHP-5.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=eeab3be3037e2c537393f630b496017c9f888736
Log:
Fix bug #61459 popen_close_basic-win32 can't run sort.exe
Bugs:
https://bugs.php.net/61459
Changed paths:
M ext/standard/tests/file/popen_pclose_basic-win32.phpt
Diff:
eeab3be3037e2c537393f630b496017c9f888736
diff --git a/ext/standard/tests/file/popen_pclose_basic-win32.phpt
b/ext/standard/tests/file/popen_pclose_basic-win32.phpt
index 8c2ba42..b5c7256 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);