ID: 8466
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Duplicate
Status: Closed
Bug Type: Program Execution
Assigned To: 
Comments:

Fixed in CVS.

--Jani


Previous Comments:
---------------------------------------------------------------------------

[2001-02-22 05:19:07] [EMAIL PROTECTED]
seems to be dup of #8992

---------------------------------------------------------------------------

[2000-12-28 17:29:17] [EMAIL PROTECTED]
The functions Exec() and System() fails to pass the return status of the command to 
the return_var variable. It always passes "-1".

This script reproduces the bug:

<?php
 $rc=0;
 unset($array);

 exec ("ls /", $array, $rc);
 echo "return value: $rc<br>";
 echo "output:<br>";

 $rows=count($array);
 for ($i=0; $i<$rows; $i++) {
  echo $array[$i]."<br>";
 }
?>

The output is:

return value: -1
output:
bin
boot
dev
...etc...

The "return value" is also "-1" if I change "/" to "/dont/exists/".

This bug is introduced in version 4.0.4, exec() worked in version 4.0.3pl1.


---------------------------------------------------------------------------



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8466&edit=2


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to