0

I'm pretty new to using SSH and such to install software. I'm trying to use https://github.com/eyecatchup/php-yt_downloader on my site (http://voddr.com/yt/index.php?id=yrreBFLghMc) but as you can see, it comes back with the error "You must have Ffmpeg installed in order to use this function."

I have installed ffmpeg, using Nux Desktop (see the guide I followed here: https://www.vultr.com/docs/how-to-install-ffmpeg-on-centos)

When typing "ffmpeg" into SSH it comes back with this, which must mean it is installed:

command: ffmpeg

Also, I tried the command "which ffmpeg", which returned the path of ffmpeg: "/usr/bin/ffmpeg"

php-yt_downloader uses which ffmpeg to detect whether it is installed, and if not, it returns the error "You must have Ffmpeg installed in order to use this function." - but if I'm able to use it fine from my SSH window, why can't the script detect it?

All I'm wondering, is there something else I must do when installing software to allow a domain to use it (like install the software in the domain's path?), or is this entirely a problem with the php-yt_downloader resource? I'm using CentOS 7 and Plesk web panel.

Kenster
  • 23,465
  • 21
  • 80
  • 106
nulled
  • 383
  • 1
  • 5
  • 20

1 Answers1

1

I think you have done everything right installing the software. I would check your php environment. Have a look at this link from the php manual.

Note: The backtick operator is disabled when safe mode is enabled or shell_exec() is disabled.

I would first try the easy example on the manual page to check if the backtick operator works. It could be that your webserver setup does not allow shell execution and this is what yt_downloader is using, see their source code.

data cosmos
  • 313
  • 3
  • 14
  • Hmm, this works fine. It outputs the files in the web directory along with some other info. Weird – nulled Jan 11 '17 at 22:44
  • So what is the output if you change in that page $output = \`ls -al\`; to $output = \`which ffmpeg\`; And double check if in the yt_downloader code there are really backticks - somtimes copy and pasting can cause trouble with these backticks. – data cosmos Jan 11 '17 at 22:50
  • It doesn't output anything when I change it to `which ffmpeg`... So that means it doesn't have permission? Or it simply didn't find it? – nulled Jan 11 '17 at 23:05
  • strange, so try \`set\`and look in the output for path - is there /usr/bin listed? And what do you get with \`/usr/bin/ffmpeg\` - if you get the same output as in the shell you will have to somehow provide the path to the ffmpeg prog in the config of yt_downloader. Or you'll have to provide /usr/bin to the path variable for the script , see also https://stackoverflow.com/questions/10835923/how-to-set-path-for-php-exec-or-shell-exec?rq=1 – data cosmos Jan 11 '17 at 23:15