Simple question, probably a nasty answer... but after searching the backlog of forum posts, this has come up A LOT, and no one... NO ONE has been able to answer it clearly, or at all actually.
Lets just work on this one single example:
exec('kill -9 34742',$result);
Does it do it? Well, yes and no. It executes the app of kill, but it does not do anything to the process of the same number.
PHP Doesn't have the privs. So, how would one go about doing the above command, within a PHP script, with the right privs?
Things Ive tried:
copied "kill" to a new "apache" user/grp only dir, with execute privs strictly for apache user/grp = No work, does the same thing.
Tried doing a popen, fputs of "su, password, command, exit" = No work, does nothing.
Read all the damned docs on the exec command, and its cohorts of shell_exec, system, and bitboy.
Any Ideas?