note 76711 modified in function.proc-open by ohill

From: Date: Tue, 18 Nov 2008 18:55:27 +0000
Subject: note 76711 modified in function.proc-open by ohill
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-146654@lists.php.net to get a copy of this message
missilesilo at gmail dot com had a great example. However error messages didn't work because of wrong stderr argument. I changed last value 'r' of <?php $descriptorspec = array( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'r') ); ?> to 'w' so that error messages are actually written. <?php $descriptorspec = array( 0 => array("pipe", "r"), // stdin is a pipe that the child will read from 1 => array("pipe", "w"), // stdout is a pipe that the child will write to 2 => array("pipe", "w") // stderr is a file to write to ); ?> --was-- missilesilo at gmail dot com had a great example. However error messages didn't work because of wrong stderr argument. I changed last value 'r' of $descriptorspec = array( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'r') ); to 'w' so that error messages are actually written. $descriptorspec = array( 0 => array("pipe", "r"), // stdin is a pipe that the child will read from 1 => array("pipe", "w"), // stdout is a pipe that the child will write to 2 => array("pipe", "w") // stderr is a file to write to ); http://php.net/manual/en/function.proc-open.php

« previous php.notes (#146654) next »