tim967 Posted April 6, 2011 Share Posted April 6, 2011 Hi everyone, i'm trying to get it so when i visit my webpage called start.php it executes the command (/bigbrotherbot start) in the terminal which then should start the process on my linux machine. I'm currently using this code <?php shell_exec('sudo /bigbrotherbot start'); ?> This script doesn't appear to do anything though. I'm very new to php and would really appreciate the help. P.S the file bigbrotherbot is the bash script which works if i actually go to the terminal myself and type /bigbrotherbot start yet when i try to make the php do it it doesnt do anything. any ideas? Quote Link to comment Share on other sites More sharing options...
clanstyles Posted April 6, 2011 Share Posted April 6, 2011 I don't think that's the full path of the bot. Also ./bigbrotherbot Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 6, 2011 Share Posted April 6, 2011 Does the user that the webserver is running under have permission to do a sudo? Ken Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.