|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesbug60131.diff (last revision 2011-10-30 03:14 UTC by cataphract@php.net)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-10-30 03:09 UTC] cataphract@php.net
[2011-10-30 03:09 UTC] cataphract@php.net
-Status: Open
+Status: Wont fix
[2011-10-30 03:14 UTC] cataphract@php.net
[2011-10-30 03:14 UTC] cataphract@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 12:00:01 2025 UTC |
Description: ------------ If fopen('php://stdout', ...) is used in a php processus open with proc_open(), all posterious call to echo or print seems to be redirected to /dev/null. Test script: --------------- <?php $descriptors = array( 0 => array("pipe", "r"), 1 => array("pipe", "w") ); $php = proc_open('php', $descriptors, $pipes); stream_set_blocking($pipes[1], 0); fwrite($pipes[0], '<?php echo \'foo\'; fopen(\'php://stdout\', \'w\'); echo \'bar\'; ?>'); fclose($pipes[0]); $null = null; $select = array($pipes[1]); while (feof($pipes[1]) === false) { if (stream_select($select, $null, $null, null)) { var_dump(stream_get_contents($pipes[1])); } } Expected result: ---------------- foobar Actual result: -------------- foo