title: PHP - How to get Shell errors echoed out to screen
body: <p>I am in the process of using <code>shell_exec()</code> for the first time. I am trying to convert some video files on my server using the ffmpeg shell script. </p>
  
  <p>When I the below code in the browser, it returns NULL:</p>
  
  <pre><code>var_dump(shell_exec("ffmpeg -i /var/www/html/sitedomain/httpdocs/tmp/ebev1177.mp4"));
  </code></pre>
  
  <p>However when I run the equivalent code in my terminal:</p>
  
  <p><code>&gt; ffmpeg -i /var/www/html/sitedomain/httpdocs/tmp/ebev1177.mp4</code></p>
  
  <p>I get back a whole load of useful information which ends in an error <code>"At least one output file must be specified"</code></p>
  
  <p>Why is this info not being passed back to my PHP script so I can echo it out?</p>