title: IIS7 - giving php access to command-line
body: <p>I am running a cookie-cutter r-script from the command-line using the php5.3 exec function. The idea being that the user selects data, php runs the script, and the user is able to download the high resolution graphic. I've run this on my local testbed with apache and everything worked fine, however, the production server is Windows Server 2003 with IIS7 (something I cannot control). It seems with IIS7, by default, php does not have access to cmd.exe. We've tried changing permission to cmd.exe with the "calcs" command with no success. </p>
  
  <p>How do I give php permission to access the command-line through the use of the exec function?</p>
  
  <p><em>P.S. I know, I know, I know. No user input is being executed with the exec function. We just want to take advantage of R's high resolution graphics and data processing capabilities.</em></p>
  
  <p>Relevant Details:</p>
  
  <ul>
  <li>OS is windows server 2003 64-bit</li>
  <li>IIS7</li>
  <li>The server is an Amazon EC2 instance</li>
  <li>(I don't believe this to be an issue with Amazon as I've heard of people do similar things with a LAMP stack Amazon instance)</li>
  </ul>
  
  <p><strong>EDIT:</strong> the problem ended up being that for some reason IUSR did not have permission to use the "start" command in command-line.</p>
  
  <pre><code>REM commands below did not work
  start "Path to .exe" "File to process"
  start "" "Path to .exe" "File to process"
  
  REM this one did however
  "Path to .exe" "File to process"
  </code></pre>