php exec() error…

在Ubuntu环境下,用户遇到使用php执行ffmpeg命令时出现错误,原因是缺少libgcc_s.so.1依赖。通过将该文件复制并重命名为libgcc_s.so.1覆盖原有文件,问题得以解决。

我在用php执行一段JAVA代码时,发现执行不了。

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');

 

答案

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

原文:http://stackoverflow.com/questions/6255582/php-exec-error-anyone-know-what-this-means

转载于:https://www.cnblogs.com/caroar/archive/2012/10/18/2728761.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值