Jump to content

PHP execute linux terminal command (bash Script)


tim967

Recommended Posts

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.