php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24078 bug on function proc-open
Submitted: 2003-06-08 03:17 UTC Modified: 2003-06-08 03:58 UTC
From: ppval at rol dot ru Assigned:
Status: Not a bug Package: Program Execution
PHP Version: 4.3.2 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ppval at rol dot ru
New email:
PHP Version: OS:

 

 [2003-06-08 03:17 UTC] 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); 
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-08 03:58 UTC] wez@php.net
please read the documentation again; you have opened your pipes in the wrong direction.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 15:01:56 2024 UTC