title: run exe file on apache server
body: <p>Should it be possible to put an exe file on an apache server, send a text file via a php form, have the exe process the text file and then send the results back to the client?</p>
  
  <p>Or is this generally not possible (if so, why)?</p>
  
  <p>I looked around a bit but I havent really gotten a conclusive answer. Some say you should use the exe as a cgi script and some say it's only possible on a windows server.</p>
  
  <p>Thanks!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>My code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;?php
  echo exec('whoami');
  echo exec("my.exe");
  echo "&lt;h1&gt;Success&lt;/h1&gt;";
  ?&gt; 
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Works locally. Should this also work on an apache server hosted by a webspace company? (provided that they didn't prohibit exec).</p>