From: mbanefo_barbara at NOSPAM dot yahoo dot com
Operating system: HP UX
PHP version: Irrelevant
PHP Bug Type: Output Control
Bug description: exec malfunction during error redirection
Description:
------------
Help !
The exec command (see code below) produces unexpected results on my system
( PHP 4.2.1 with an Apache/1.3.24 Server on a HP-UX )
Do you have a solution for this ?
Barbara
Reproduce code:
---------------
<?php
error_reporting(E_ALL);
$cmd = "mkdir toto" ;
echo "<br><pre>";
$err=exec("$cmd 2>&1");
echo $err;
echo "</pre>";
?>
Expected result:
----------------
First run :
empty result
Successive runs :
mkdir: cannot create toto: File exists
Actual result:
--------------
When safe Mode is enabled :
This creates 2 directories : "toto" and "2>&1"
No errors are reported
When safe-mode is disabled, the program gives the expected result
--
Edit bug report at http://bugs.php.net/?id=26905&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26905&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26905&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26905&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26905&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26905&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26905&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26905&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26905&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26905&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26905&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26905&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26905&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26905&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26905&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26905&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26905&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26905&r=float