Results 1 to 3 of 3
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-29-2009 #1Just Joined!
- Join Date
- Mar 2008
- Posts
- 23
apache
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
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
- 01-29-2009 #2
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?
- 01-29-2009 #3Just Joined!
- Join Date
- Mar 2008
- Posts
- 23
apache
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


Reply With Quote
