1

I add user with right permission in this file:

/etc/httpd/conf/httpd.conf

But shell_exec,system,exec can't run all command. For example I can go to root folder and get list of files and directory in /root folder, but when i use

shell_exec('ffmpeg');

nothing execute and nothing reply. What should i do?

7
  • try executing 'ls' . do you get anything? Commented Sep 3, 2016 at 7:20
  • 1
    ffmpeg needs a filename argument. What do you expect it to do with no argument? Commented Sep 3, 2016 at 7:26
  • shell_exec() returns the output of the command. If you want to see it, you need to echo it with echo shell_exec('ffmpeg'). If you also want to see error messages, you should redirect stderr, echo shell_exec('ffmpeg 2>&1'); Commented Sep 3, 2016 at 7:27
  • ls,cd /root and other command work very well and return output but when i use shell_exec('fmpeg ...') return is empty but when i type this command in linux terminal convert my file perfectly. Commented Sep 3, 2016 at 7:31
  • @barmar the result of shell_exec('ffmpeg 2>&1'); is sh: ffmpeg: command not found Commented Sep 3, 2016 at 7:34

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.