title: FFMPEG shell execution with PHP - Unusual Error Because of GCC
body: <p>I've been trying to debug the PHP Script, but the error message that I receive is very unusual.</p>
  
  <ul>
  <li>CP, MV , WHOAMI  - all these commands work with shell_exec</li>
  <li>FFMPEG is installed</li>
  <li>apache user - <strong>nobody</strong> with read write execute permission for <strong>nogroup</strong> to /usr/bin/ffmpeg. </li>
  <li>FFMPEG working fine in terminal.</li>
  <li>GCCPP is installed and GCC package is also installed.</li>
  <li>Working with shell PHP command (brock@ubuntu~$ php runthis.php)</li>
  </ul>
  
  <p>Code I ran:</p>
  
  <pre><code>exec('ffmpeg -i beep.mp3 -ac 1 -ar 48000 -ab 128k audio1.mp3 2&gt;&amp;1', $out, $rv);
  echo "output is:\n".implode("\n", $out)."\nexit code:$rv\n";
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>output is: ffmpeg: /opt/lampp/lib/libgcc_s.so.1: version `GCC_4.0.0' not found (required by /usr/lib/libdirac_encoder.so.0) ffmpeg: /opt/lampp/lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6) exit code:1
  </code></pre>
  
  <p>Can someone help me out here?</p>