I'm trying to use exec() in PHP and i get different results when using it through a web browser and via the command line shell.
simple thing:
<?php exec('mount 10.0.0.1:/mnt/test /home/user/test', $output) ?>
calling this from a web browser results in nothing being mounted and running it through the command line (php-cli) results in the mount being executed successfully. there are also no errors being returned to the $output array. So I haven't got anything to go by. I'm running the web and cli both as the same user, so it shouldn't be a permissions problem. SElinux is disabled and therefore doesn't block anything. Same thing for the firewall - disabled as well.
How can I make PHP exec() behave the same way in a web browser and via command line?