Hello,

On Fri, Aug 14, 2009 at 09:59:41AM -0500, Andres Salazar wrote:
> I have a script that is being called from the web  , it invokes the
> system() function and I try to test running some system commands to
> see if they are properly invoked.
> mv and cp do not display any output (this do not execute), while cat
> and ls do.  If I run the script via the command line all of the
> commands display ouput (even if its the usage help info of each
> command) .

Maybe just a stupid thought, but could it be that cp and mv, for some
particular reason linked to that setup, output to stderr, while ls and
cat output to stdout. That would assume that system() only catches
stdout (to be checked), but could be a problem a stream redirection.

I just checked and confirmed that usage help and error messages (e.g. in
case of right problem) of cp are output on stderr.

--
Olivier Mehani <sht...@ssji.net>
PGP fingerprint: 4435 CF6A 7C8D DD9B E2DE  F5F9 F012 A6E2 98C6 6655

[demime 1.01d removed an attachment of type application/pgp-signature]

Reply via email to