![](/img/trans.png)
[英]Two Shell_Exec Command with PHP button but still in the One powershell?
[英]shell_exec already enabled but still needs to be enabled
我正在使用 PHP v7.2 並且當前安裝了具有 function 的 CMS,它通過 FFMPEG 自動為視頻添加水印。
它使用“shell_exec”運行 FFMPEG。“shell_exec 和 exec”沒有本地值,但它仍然在腳本/php 中顯示 shell_exec 由於安全原因已被禁用。 我已經聯系了服務器,他們還說它在 PHPINFO 中顯示已啟用,但執行 FFMPEG 時出現錯誤。
FFMPEG 是這樣的 >
$cmd = shell_exec("$ffmpegPath -ss 00:00:01 -i $convertUrl -c copy -t 00:00:04 $xVideoFirstPath 2>&1");
$cmd = shell_exec("$ffmpegPath -i $convertUrl -ss 00:00:01.000 -vframes 1 $videoTumbnailPath 2>&1");
上傳視頻時顯示錯誤:
Warning: shell_exec() has been disabled for security reasons in /home/zxc/domains/zxc.com/public_html/requests/request.php on line 307
由於這些函數允許代碼直接在服務器上執行(不僅僅是 PHP),它們通常受到主機的限制。 如果您使用的是共享托管計划,那么這很可能是發生的事情。
即使安裝了擴展,它也已使用 PHP disable_functions
指令禁用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.