title: Using killall command in php from a button click
body: <p>I am looking to have a button on a webpage that I can use to kill all of the node processes that are running. I have got it working fine from terminal on Mac OS by using sudo killall node, but when i have tried to create a button from the website I am getting the error 'No matching processes belonging to you were found'.
  My code is,</p>
  
  <pre><code>&lt;?php
   if (isset($_POST['button'])) { exec('/usr/bin/ sudo killall node'); } ?&gt;
   &lt;form method="POST"&gt;
  &lt;p&gt;
      &lt;input type="hidden" name="button" value="1"&gt;
      &lt;input type="submit" value="Stop"&gt;
  &lt;/p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I am guessing it is because I need to type in a password for sudo is why it won't work on the webpage. Is there a way around this or another option for doing it? thanks..</p>