Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php exec() error...Anyone know what this means?

I have just installed ffmpeg on ubuntu using this guide http://ubuntuforums.org/showthread.php?t=786095, when I execute the ffmpeg command shown below, it works fine in terminal and it works when I execute the php file I am using through the terminal by using the 'php' command.

When I try to execute the file using a browser, however, I get the following error in my apache error log. If anyone could give me guidance, I would really appreciate it.

ERROR

/usr/local/bin/ffmpeg: /opt/lampp/lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/i386-linux-gnu/libstdc++.so.6)

PHP code

define('FFMPEG_LIBRARY', '/usr/local/bin/ffmpeg');

$command = shell_exec('/usr/local/bin/ffmpeg -i /home/geoff/Desktop/cave.wmv -acodec libfaac -aq 100 -vcodec libx264 -preset slow -crf 22 -threads 0 /home/geoff/Desktop/newvideo.flv');

like image 316
Scarface Avatar asked Jun 06 '11 17:06

Scarface


1 Answers

This worked for me.

http://blog.codyjung.com/2011/05/29/problems-with-lampp-and-exec/

I went into /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2

and copied the libgcc_s.so into

/opt/lampp/lib and renamed it to libgcc_s.so.1 to overwrite the previous file

like image 169
Scarface Avatar answered Oct 10 '22 01:10

Scarface