--- embedaddon/php/ext/standard/tests/file/popen_pclose_basic-win32.phpt 2012/05/29 12:34:44 1.1.1.2 +++ embedaddon/php/ext/standard/tests/file/popen_pclose_basic-win32.phpt 2013/07/22 01:32:08 1.1.1.3 @@ -39,7 +39,10 @@ $arr = array("ggg", "ddd", "aaa", "sss"); // // 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"); + +$sysroot = exec('echo %SYSTEMROOT%'); + +$file_handle = popen("$sysroot/system32/sort", "w"); $newline = "\n"; foreach($arr as $str) { fwrite($file_handle, (binary)$str);