note 76711 deleted from function.proc-open by cmb
| From: | cmb@php.net | Date: | Mon, 31 Aug 2015 18:51:56 +0000 |
| Subject: | note 76711 deleted from function.proc-open by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-203535@lists.php.net to get a copy of this message | ||
Note Submitter: Antti Kauppinen
----
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
);
?>