title: execute linux commands from php scripts
body: <p>Good day to all.</p>
  
  <p>I need to send a request to a script and then to execute some commands (basically I need to start ffmpeg when clicking on a link).</p>
  
  <p>I tried this:</p>
  
  <pre><code>exec("ffserver &amp;");
  exec("ffmpeg -i pipe.avi output.avi");
  exec("mplayer -dumpstream someinput -dumpfile pipe.avi");
  </code></pre>
  
  <p>and this</p>
  
  <pre><code>shell_exec("ffserver &amp;");
  shell_exec("ffmpeg -i pipe.avi output.avi");
  shell_exec("mplayer -dumpstream someinput -dumpfile pipe.avi");
  </code></pre>
  
  <p>In both cases I got timeout. Can any1 help me with this? Thank you.</p>