Risky, at best.
But what about using the functions system() or exec() ?
These execute system calls as root, don't they?
If you just want to run a shell-script or some other system commands, just hard-code it into the functions (don't pass system data over the net), and it will run the default action without interaction from client.
Be sure to read about the functions before you use them, there are a lot of pitfalls. Don't allow for passing of arguments.
http://www.php.net/manual/en/function.system.php
http://www.php.net/manual/en/function.exec.php
And put the script well behind a login of some sort 😉
knutm