I try to use php exec() run command as sudo, but not working. I also edited my sudoers(visudo) file with the following lines.
apache ALL=(All) NOPASSWD:
Here is php code:
<?php exec("sudo ping 127.0.0.1 -c 1",$output); var_dump($output); ?>
How can I fix this problem?