title: PDFtk command not running from exec
body: <p>I've moved my code form one WAMP computer to another and the code that runs pdftk stopped working. I've compared the permissions on pdftk.exe and they are the same on both machines. When I run the same command from a command prompt, it works. I add <code>exec("whoami")</code> to the script and the user is the same on both computers. When I run something like <code>exec('dir 2&gt;&amp;1', $out)</code> it executes so I know exec is working form within php. </p>
  
  <p>I've created a trivial php file to test and it doesn't work. </p>
  
  <pre><code>&lt;?php 
  $String = 'pdftk.exe &gt; "c:\temp\temp.txt"';
  exec("$String");
  exec("pdftk.exe &gt; \"c:\temp\temp.txt\"");
  ?&gt;
  </code></pre>
  
  <p>Both exec command result in a 0 byte file being created. </p>
  
  <p>if I run </p>
  
  <pre><code>pdftk.exe &gt; "c:\temp\temp.txt"
  </code></pre>
  
  <p>from a command line it puts the output of pdftk.exe into the temp.txt file as expected. </p>
  
  <p>This seems like is must be some kind of permissions issue, but permissions on the executable seem to be the same. Losing my mind on this.</p>