如何在php shell_exec(“wine ffmpeg.exe”)中启动wine; ?ubuntu版本14中设置权限(PHP5)shell_exec(“wine ffmpeg.exe”)
(ubuntu的版本14服务器)
安装
sudo apt-get install wine -y
PHP5代码:
$cmd = "/usr/bin/wine /var/www/html/ffmpeg.exe upload/image.jpg"
shell_exec($cmd);
ffmpeg.exe位置: /无功/网络/ HTML/
酒是没有开始?
Linux版本的FFmpeg ?,如何运行PHP shell_exec()?
Server域是不是在共享主机
权限上www-data
可能是什么问题?
命令ffmpeg终端成功!
有一个权限问题,只是测试和命令是正确的。
ffmpeg.exe或wine有不正确的权限。
司令部(ffmpeg.exe)
chmod 755 ffmpeg.exe
chown www-data ffmpeg.exe
命令(在/ usr/bin中/葡萄酒)
chmod 755 wine
chown www-data wine
sudo service apache2 restart
仍无法正常工作,可能是更多的 '酒' 文件将权限应用于。 我不能输出任何错误,并且命令的ffmpeg是从终端正确的问题一定权限
这究竟有五个upvotes和两个最喜欢的明星吗?你“假设”它开始不正确?你为什么要假装什么?当您尝试运行该命令时,是否查看过STDOUT,STDERR或返回值?是的,当然有一个Linux版本的ffmpeg。基本的网络搜索会告诉你。没有什么特别的东西需要通过PHP来运行。请在此之前进行基础研究,并阅读[询问]提出有效问题的提示。 – Chris
(STDOUT)。 $ proc = popen($ cmd,'r'); echo $ proc; =(OUTPUT)资源ID#20 – user235423423424
shell_exec($ cmd,$ output); var_dump($ output); (输出)= NULL – user235423423424