Hi every one,
I want apache to do any root command via exec() function like this:
exec("service mysqld restart"), I could not do that, also when i tried to copy file by using copy() php function also Icould not copy, but i can copy the empty file, I tried to write php program to copy file and I executed it by shell command #php file.php the result is file copied but when i execute the same script by browser(apache) no file copied :mad:
may be the problem from permission I edidted visudo file and gave apache all permission but no thing changed.
Can you help me, I sure you can:D
can I ask why you would want to do that? Seems a big security risk to allow apache to run commands as root. why not use something like webmin if you just want a web gui?
the reson is i want to design web-base interface by php to configure asterisk system and in this interface i want to relaod the asterisk after configuration but my problem is i can not do any command like reload asterisk by exec("asterisk -rx reload") as i told:!: