I use the command
ffmpeg-I / home/video/a.mp4-r 1-s 950x520-f image2 / home/video/a.jpg
can be executed on the terminal,
but in the PHP file, I run
exec ("ffmpeg-I / home/video/a.mp4-r 1-s 950x520-f image2 / home/video/a.jpg") through a browser but fail.
online Baidu says it"s a permission problem, so test,
echo shell_exec ("ls") can execute
echo shell_exec (" whoami") to display nginx
so vim / etc/sudoers adds
Allow root to run any commands anywhere
root ALL= (ALL) ALL
nginx ALL= (ALL) ALL
after saving, reboot restarts but it doesn"t work.
A lot of people have this problem on the Internet, but I don"t see a useful solution. I hope you can give me an answer if you still know.