PGzxc 2019-12-13
原文链接:http://www.bowen-tech.top/articles/detail/25
<span> <span>打印具体报错命令</span></span>
<span> <span>0<span> <span>=><span> <span>‘sh: ffmpeg: command not found‘<span>,</span></span></span></span></span></span></span>
具体原因是通过PHP调用这个命令,没有引入对应的环境变量,导致找不到这个命令
在PHP-fpm.conf的配置文件里面把下面几行前面的;去掉
我的PHP配置文件php-fpm.conf 在/usr/local/php/etc/php-fpm.conf ;
env[PATH]里面加入ffmpeg的路径,比如我的在/usr/local/ffmpeg/bin
<span>env<span>[<span>PATH<span>]<span> <span>=<span> <span>/usr/<span>local<span>/<span>bin<span>:<span>/usr/<span>bin<span>:<span>/bin:/usr<span><span>/local/ffmpeg/bin</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>