title: PHP System Call Always Fails
body: <p>(Seemingly) no matter what command I try to run with PHP's <code>system</code> function, the command always does nothing and then fails with exit code 1. For example,</p>
  
  <pre><code>system("echo 'this should definitely work'", $retval);
  </code></pre>
  
  <p>sets <code>$retval = 1</code>. So does</p>
  
  <pre><code>system("dir", $retval);
  </code></pre>
  
  <p>as well as running an executable that I've written; when I run</p>
  
  <pre><code>vfmt -h cat.v
  </code></pre>
  
  <p>from <code>cmd.exe</code> the command works and returns with exit code 0, but running</p>
  
  <pre><code>system("vfmt -h cat.v", $retval);
  </code></pre>
  
  <p>again sets <code>$retval = 1</code>. This <code>vfmt.exe</code> file is in the same directory as the <code>src.php</code> script that is attempting these <code>system</code> calls.</p>
  
  <p>I am nearly at my wit's end trying to figure out what's wrong. What could possibly be causing this issue?</p>