I'm using nginx with php , and I would like to run some command with exec() http://php.net/manual/fr/function.exec.php .
the current example work perfectly echo exec('whoami');
but when I try with other command the output is empty.
the exec() is enabled on my php.ini and the safe mode is disabled , I also edited the sudoers www-data ALL=(ALL:ALL) ALL
but sudo -u www-data cammand
still required a password
Any solution please, thank you all