i want to run a script from php like root user
so in php i use this
$output = shell_exec('sudo /usr/bin/sh /var/www/kill.sh');
echo "<pre>$output</pre>";
now in centos7 i run vim /etc/sudoers and at the end of the file i pasted this
apache ALL=(ALL) NOPASSWD: ALL
then i restart: systemctl restart httpd
but is not working
also i tried this: shell_exec('ls') it works and shell_exec('sudo ls') is not working