我对使用 SSH 等安装软件还很陌生。我正在尝试使用 https://github.com/eyecatchup/php-yt_downloader在我的网站 ( http://voddr.com/yt/index.php?id=yrreBFLghMc ) 上,但如您所见,返回时出现错误“您必须安装 Ffmpeg 才能使用此功能。”
我已经使用 Nux Desktop 安装了 ffmpeg(参见我在此处遵循的指南:https://www.vultr.com/docs/how-to-install-ffmpeg-on-centos)
当在 SSH 中输入“ffmpeg”时,它会返回这个,这一定意味着它已安装:
此外,我尝试了命令“which ffmpeg”,它返回了 ffmpeg 的路径:“/usr/bin/ffmpeg”
php-yt_downloader
使用which ffmpeg
检测是否安装,如果没有则返回错误“You must have Ffmpeg installed in order to use this function ” - 但如果我能够在我的 SSH 窗口中正常使用它,为什么脚本无法检测到它?
我想知道的是,在安装软件以允许域使用它时我还必须做些什么吗(比如在域的路径中安装软件?),或者这完全是 php 的问题-yt_downloader
资源?我正在使用 CentOS 7 和 Plesk 网络面板。
最佳答案
我认为您已正确安装软件。我会检查你的 php 环境。看看这个链接 from the php manual .
Note: The backtick operator is disabled when safe mode is enabled or shell_exec() is disabled.
我会首先尝试使用手册页上的简单示例来检查反引号运算符 是否有效。可能是您的网络服务器设置不允许执行 shell,而这正是 yt_downloader 正在使用的,请参阅 their source code.
关于php - Web 脚本找不到已安装的包/软件 (CentOS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41601639/