0
votes
5answers
661 views

How to run su from PHP launched on Apache? [closed]

I tried to run su command with PHP shell_exec function. At first I tried: <?php echo(shell_exec('echo \'password\' | su user -c \'whoami\' 2>&1;')); ?> and I got: su: must be run from ...
3
votes
2answers
742 views

“su _www helloworld.php” does nothing

In the context of a larger effort, I've run across a particular issue that is baffling me. On Mac OS X 10.6.7, using the system provided Apache and PHP, I have created a simple HelloWorld.php script ...