note 3340 deleted from ref.exec by didou

From: Date: Sun, 03 Aug 2003 10:20:01 +0000
Subject: note 3340 deleted from ref.exec by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-53247@lists.php.net to get a copy of this message
Note Submitter: kop@meme.com ---- These functions all execute the given command in a shell, so standard shell redirection, command sequencing, piping, etc. can be used.<p> There appears to be no way to execute a command, feed it stuff on standard in, and retreive the return code and the output sent to standard out (not to mention standard error). You can try writing a wrapper for the command that you wish to execute, one that takes an argument to be used as standard in. Then use exec() to execute it and capture standard out and the return code. But don't do this with passwords because the password will be visible to anybody doing a "ps" command.<p> If you're having trouble creating or modifying files, it's probably a permission problem. Your code is running as the webserver; a user that has few permissions.

« previous php.notes (#53247) next »