Php exec () error ... Does anyone know what this means?

I 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 the terminal and it works when I execute php the file that I use through the terminal using the "php" command.

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

ERROR

/ USR / local / bin / FFmpeg: / opt / lampp / lib / libgcc _s.so.1: version of `GCC_4.2.0 'not found (requires / USR / Library / i 386-Linux-GNU / libstd ++. 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 ');

+6
source share
4 answers

It worked for me.

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

I went to / usr / lib / i 386-linux-gnu / gcc / i686-linux-gnu / 4.5.2

and copied libgcc_s.so to

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

+6
source

It looks like you have problems with the dependency version. I assume that you copied the libraries from another server that used a different version of the main system files than it does.

It is best to build from the source on the machine with which you use it. This ensures that your libraries do not link to what's missing on your system.

EDIT
And in fact, the link to / opt / lampp makes me think that you are not using the standard web server setup that you usually use on the Ubuntu server, but using a lamp instead. This may be the source of your conflict - if the material of the bulbs is not connected in the same way as with ordinary system libraries, then you cannot use them together.

+3
source

The user your web server is running on does not have the same environment as the terminal user. You will need to add / opt / lampp / lib to your web server user environment. Locate / opt / lampp / lib in /etc/ld.so.conf and in /etc/ld.so.conf.d. If it does not exist, create a new file in the /etc/ld.so.conf.d file with a line containing only this path. You will need to restart the web server.

0
source

Looking at this post: http://fedoraforum.org/forum/showpost.php?p=1375187&postcount=2

I feel that your problem can be solved, try installing PHP from APT-GET instead of LAMPP and see if your problem solves.

You can get PHP, APACHE and MySQL with:

sudo apt-get install apache2, libapache2-mod-php5, php5, mysql-client, mysql-common, mysql-server - http://rakeshsankar.wordpress.com/2010/09/10/install-setup-debian-server/ 
0
source

Source: https://habr.com/ru/post/889884/


All Articles