title: Unable to execute CLI commands through PHP
body: <p>OS: ubuntu 11.10
  Webserver: Apache
  Code: PHP
  I am trying to display the output of command "ffmpeg -i " on the webpage using php. 
  Required: The webpage should show the information about video (text).
  Whats happening: The webpage shows no text output on running the php code. 
  If I was however doing system("ls") the code runs fine and outputs the list of files.
  Here's my code</p>
  
  <pre><code>&lt;?php
   echo "Details of video file:";
   system('ffmpeg -i /home/atish/Videos/T2V0040006_Angled_ride_720x576i_FLDCMB.avi');
  ?&gt;
  </code></pre>
  
  <p>The same command works fine on my shell, and my system has ffmpeg installed. Here's a snapshot of executing this command directly on shell:</p>
  
  <pre><code>ThinkPad-T420:~/Videos$ ffmpeg -i /home/xx/Videos/T2V0040006_Angled_ride_720x576i_FLDCMB.avi
  ffmpeg version git-2012-01-10-7e2ba2d Copyright (c) 2000-2012 the FFmpeg developers
  built on Jan 10 2012 12:01:19 with gcc 4.6.1
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-    amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
    libavutil      51. 34.100 / 51. 34.100
    libavcodec     53. 54.100 / 53. 54.100
    libavformat    53. 29.100 / 53. 29.100
    libavdevice    53.  4.100 / 53.  4.100
    libavfilter     2. 58.100 /  2. 58.100
    libswscale      2.  1.100 /  2.  1.100
    libswresample   0.  6.100 /  0.  6.100
    libpostproc    51.  2.100 / 51.  2.100
    Input #0, avi, from '/home/atish/Videos/T2V0040006_Angled_ride_720x576i_FLDCMB.avi':
    Metadata:
    encoder         : Lavf52.23.1
    Duration: 00:00:29.00, start: 0.000000, bitrate: 124422 kb/s
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x576, 25 tbr, 25 tbn, 25 tbc
    At least one output file must be specified
  </code></pre>
  
  <p>I have tried appending "DISPLAY=:0" to my command and also done "xhost +" before running php code, but nothing is helping me out.</p>
  
  <p>Thanks.</p>