Executing shell commands
| From: | Teren | Date: | Sun, 09 Nov 2003 08:41:56 +0000 |
| Subject: | Executing shell commands | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-168985@lists.php.net to get a copy of this message | ||
Hi, I'm trying to write a front end for something and I want to be able to execute shell
commands. I tried all of the pre-written functions and non of them would work. I setup a user that
can sudo and then i set apache to run as that user. So, what I tried to do is shell_exec("sudo
-s; reboot;"); but that didn't work, I also tried other numerous variations all of which
didn't work (also using exec(), system(), passthru() ). If any one has any ideas how i can do
this, please let me know. Thanks
Teren