In ubuntu terminal, I can kill "firefox" with this comand:
pgrep python | xargs kill
and it works.
But if I try to execute this comand in php in localhost, with this code:
exec("sudo pgrep firefox | xargs kill",$output);
It doesn't work and the output is an empty array.
I've just added "www-data" in sudoers. Other exec comand work.