php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30700 Empty output using system(<wrong string>) function
Submitted: 2004-11-06 14:05 UTC Modified: 2004-11-06 15:47 UTC
From: igor dot makarov at mail dot ru Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.8 OS: Linux 2.4.27
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: igor dot makarov at mail dot ru
New email:
PHP Version: OS:

 

 [2004-11-06 14:05 UTC] igor dot makarov at mail dot ru
Description:
------------
I make a code:
system('ls -gfjgsfl');

and I nothing see then as I read in manual: "Execute an external program and ->display output<-"

In this situation then I use wrong unix command the system() function not worked propertly.

I think what it's will be solved in next version...
I do not know how it's work under PHP5.

P.S.
With passthru() and exec() functions same problem :o(

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

system('ls -gfjgsfl');
//nothing see

$_out = system('ls -gfjgsfl');
//still nothing see

?>

Expected result:
----------------
/bin/ls: invalid option -- j
Try `/bin/ls --help' for more information.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-06 15:47 UTC] tony2001@php.net
Errors are written to error_log by default, so check out your Apache's error log for them. If you really want to see error messages when using system() - redirect stderr to stdout:
<?php system ("ls -j 2>&1"); ?>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC