title: Changing ip address of apache server using php
body: <p>I am trying to create a settings page(for the clients) where in they can view the current up address,change the ip address etc. I have a php file to view the ip address</p>
  
  <pre><code> &lt;?php
    $res=shell_exec("ifconfig");
    echo $res;
   ?&gt;
  </code></pre>
  
  <p>This code works just fine and displays the expected result. 
  However the code to change the ip address of the server is not working properly. </p>
  
  <pre><code> &lt;?php
   shell_exec("ifconfig eth0 192.168.163.136");
   ?&gt;
  </code></pre>
  
  <p>After running this code when i check the ipaddress on the terminal using ipaddr i don't see any change in the ipaddress. 
  Pls point out where i am going wrong. I think its a problem of apache not being a super/root user. If that is the case i don't know how to make apache run as a root user.</p>