如何在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