The problem is that i can't use exec(cp /var/www/html/dhcpd.conf /etc/dhcp.conf) or exec(sudo -u root cp /var/www/html/dhcpd.conf /etc/dhcp.conf).
I already added this line to /etc/ sudoers: ALL ALL=(ALL) NOPASSWD ALL hoping that that would help, but the problem continues.
If I run exec("whoami") in a php file, it shows apache, but exec("sudo -u root whoami") dies.
I would appreciate some help, i need this for today
Sorry for the bad english.
Please i running out of ideas.
Summary: Hot to mate exec(sudo.... ) works.
I dont care about security, I only wants it to work.