title: PHP system("touch ...") - no such file or directory
body: <p>I have a basic PHP script like this:</p>
  
  <pre><code>&lt;?php
  system("/bin/touch /root/testfile");
  </code></pre>
  
  <p>When I run this PHP script from the command line:</p>
  
  <pre><code># php myscript.php
  </code></pre>
  
  <p>I get this:</p>
  
  <pre><code>sh: /touch: No such file or directory
  </code></pre>
  
  <p>Also, touch is in the right place:</p>
  
  <pre><code># which touch
  /bin/touch
  </code></pre>
  
  <p>Is there something I need to setup in my PHP script regarding paths? Because it can't find touch (even though I specifically call it with its absolute path).</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Running <code>/bin/touch /root/testfile</code> from the command line works properly as expected.</p>
  
  <p>Also, <code>touch</code> isn't working, yes, but other things are not working as well, such as <code>sendmail</code>. I'm simply using <code>touch</code> as an example in this question to keep it simple.</p>