title: why php command `exec("service apache2 restart");` does't work on ubuntu?
body: <p>I need to execute some commands on my web server with php configured with apache.</p>
  
  <pre><code>exec("service apache2 restart", $output);
  print_r($output);
  </code></pre>
  
  <hr>
  
  <p>output:</p>
  
  <pre><code>Array (
      [0] =&gt;  * Restarting web server apache2
      [1] =&gt; Action 'start' failed.
      [2] =&gt; The Apache error log may have more information.
      [3] =&gt;    ...fail! 
  )
  </code></pre>
  
  <p>My guess is it's because of permissions of php on my ubuntu!
  What do you suggest?</p>