From:             ppval at rol dot ru
Operating system: linux
PHP version:      4.3.2
PHP Bug Type:     Program Execution
Bug description:  bug on function proc-open

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 bug report at http://bugs.php.net/?id=24078&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=24078&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=24078&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24078&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24078&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24078&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24078&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24078&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24078&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24078&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24078&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24078&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24078&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24078&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24078&r=gnused

Reply via email to