title: How to set proper PATH for proc_open
body: <p>I have a piece of code as follows:</p>
  
  <pre><code>$process = proc_open(sprintf('node "%s"', $tmpfile), $desc, $pipes);
  </code></pre>
  
  <p>Which produces</p>
  
  <pre><code>sh: node: command not found
  </code></pre>
  
  <p>I tried to set <code>$PATH</code> in <code>httpd.conf</code> with <code>SetEnv</code>, then echo it using <code>getenv('PATH')</code>. The output actually contains the path to node.</p>
  
  <p>I was able to <a href="http://php.net/manual/en/function.proc-open.php" rel="nofollow">pass</a> the variable to <code>proc_open</code>, but I'd like to avoid that because it's someone else's code.</p>
  
  <p>Is there a way for me to give it the correct path?</p>
  
  <p>I am running XAMPP 1.8.2 for Mac OS X.</p>