title: Web local application Apache: run a shell script
body: <p>I had developped a shell script and I wanted to create an UI with it. I decided to use a web interface with a local server because I have few knowledges in HTML/PHP, more than QT or Java. I simply want that my html can run a shell script on my computer.</p>
  
  <p>I have an Apache php server which I start in localhost with apachectl.</p>
  
  <p>In /var/www/html/ I have a shell script and a test_web.php file which execute this script with <code>exec('/var/www/html/test.sh')</code></p>
  
  <p>In my html I have this:</p>
  
  <pre><code>&lt;form method="POST" action="test_web.php?"&gt; 
  &lt;input type="submit" value="Execute" name="exec"&gt; 
  &lt;/form&gt;
  </code></pre>
  
  <p>If I click on Execute, it opens a new page where I see the output of echo commands from the script but it is not executed on the terminal as a standard script (like if the script is not executed on server side).</p>
  
  <p>I want this script to be executed as started from the terminal.</p>
  
  <p>Thank you for your help</p>