title: PHP exec image processing not working within single.php
body: <p>I am trying to process an externally hosted image using a php command.  </p>
  
  <p>Here is the code:</p>
  
  <pre><code>exec('convert -resize "568x150" http://www.temp.com/temp.jpg scripts/newtemp.jpg');
  </code></pre>
  
  <p>If I run this command in it's own file called for example test.php in my wordpress directory then it works fine, resizes the image and saves it into the <code>/scripts</code> folder as newtemp.jpg</p>
  
  <p>The problem occurs when I put this command into my <code>single.php</code>, then the codes doesn't seem to work and the image is not saved.</p>
  
  <p>Is there an obvious reason this wont work within the <code>single.php</code>?</p>