php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37219 shell_exec() not capturing all output.
Submitted: 2006-04-27 08:16 UTC Modified: 2006-04-30 10:53 UTC
From: egingell at sisna dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.4.2 OS: Unix w/ Apache 1.3.33
Private report: No CVE-ID: None
 [2006-04-27 08:16 UTC] egingell at sisna dot com
Description:
------------
Description is in the code snippit. It's possible that the problem lies with Apache 1.3.33.

Reproduce code:
---------------
<?

/* I don't know if it's a bug in Dreamhost's PHP 4.4.2 or a bug in Apache or what, but the following produces no output. */

echo shell_exec("mkdir -v 'fakedir';rmdir -v 'fakedir'");

/* While executig "mkdir -v 'fakedir';rmdir -v 'fakedir'" at the command line gives the following: */

/* mkdir: created directory `fakedir' */
/* rmdir: removing directory, fakedir */

/* This line produces the correct output. */ echo shell_exec("touch 'fakefile';rm -v 'fakefile'");

/* removed `fakefile' */

?>


Expected result:
----------------
Expected results are in the code snippit.

Actual result:
--------------
Actual results are in the code snippit.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-29 01:45 UTC] bjori@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Can't reproduce
 [2006-04-30 10:53 UTC] egingell at sisna dot com
Must be either a PHP or Apache installation problem.

P.S. It is not my installation it is that of my hosting provider.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 06:01:38 2025 UTC