I need to exec command from php to write into my vhosts.conf
.
I have one add_vhost.sh
file :
cat /home/www/test/conf/vhosts.conf >> /etc/httpd/conf.d/vhosts.conf
this is php script:
exec($path_to_add_vhost_sh_file, $output);
i want to set no password requirement for peter
user to exec this file, so i did next thing in my /etc/sudoers
peter ALL=(ALL)NOPASSWD:/home/www/test/conf/add_vhost.sh
but its still not working, even in console. fedora 15
sudo
in front of the command in php? – Rollet