#24078 [Opn->Bgs]: bug on function proc-open

From: Date: Sun, 08 Jun 2003 08:58:07 +0000
Subject: #24078 [Opn->Bgs]: bug on function proc-open
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-41442@lists.php.net to get a copy of this message
ID: 24078 Updated by: wez@php.net Reported By: ppval at rol dot ru -Status: Open +Status: Bogus Bug Type: Program Execution Operating System: linux PHP Version: 4.3.2 New Comment: please read the documentation again; you have opened your pipes in the wrong direction. Previous Comments: ------------------------------------------------------------------------ [2003-06-08 03:17:04] ppval at rol dot ru pipes opened by proc_open are not working under Linux (I have TSL 1.5 on Linux kernel 2.2.25). I tryed the same code under FreeBSD and TSL and there was no success in the last case (it working good under FreeBSD). PHP doesn't report any error, but I have no data in the chlid process output stream. php compiled with --with-mysql --with-apxs Here is the sample that not working on my system: $descriptorspec = array( 0 => array("pipe", "w"), // stdin 1 => array("pipe", "r"), // stdout 2 => array("pipe", "r") // stderr ); $process = proc_open("cat", $descriptorspec, $pipes); if (is_resource($process)) { fwrite($pipes[0], "Any string"); fclose($pipes[0]); while(!feof($pipes[1])) echo fgets($pipes[1], 1024); fclose($pipes[1]); fclose($pipes[2]); $return_value = proc_close($process); } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24078&edit=1

« previous php.bugs (#41442) next »