Capture stderr output from a proc_open() on windows
<p>I'm invoking the proc_open() and I can't capture the output of the process written to the stderr:</p>

<pre><code>$curFolder = getcwd();
$procDescriptor = array( 2 =&gt; array( "pipe", "w" ) );
$cmd = "MyApp.exe -f optimization.csv";
$process = proc_open( $cmd, $procDescriptor, $pipes, $curFolder );

if( is_resource( $process ) == true ) 
{
  $procStatus = proc_get_status( $process );

  while( $procStatus['running'] === true )
  {
    if( !feof( $pipes[2] ) )
    {
      $logLine = fgets( $pipes[2] );
      echo( "Read &gt;${logLine}&lt;" );
    }
    sleep( 1 );
  }
}
</code></pre>

<p>The program hangs on the fgets(). If I run the program from the command line, everything works, i.e. there is something written to the stderr (and I also tried by using the stdout with the same result). I'm running the script on Windows - the same script on Linux runs smoothly.</p>
