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, using shell_exec ("ffmpeg-I / home/video/a.mp4-r 1-s 950x520-f image2 / home/video/a.jpg") is not successful.
Baidu on the Internet said it was a permission problem, so it was tested
echo shell_exec ("ls") can execute
echo shell_exec (" whoami") to display nginx
so vim / etc/sudoers adds
< H2 > Allow root to run any commands anywhere < / H2 > root ALL= (ALL) ALL
nginx ALL= (ALL) ALL
after saving, reboot restarts but it doesn"t work.
should I add nginx to the root user group?