title: ImageMagick convert works in commandline, but not via PHP exec()
body: <p>I am using PHP's <code>exec()</code> to convert an image using ImagicMagick's <code>convert</code>. This is being run on a CentOS server.</p>
  
  <pre><code>exec(convert http://www.google.com/images/srpr/logo3w.png.jpg 
      -resize 640 /home/mysite/public_html/public/img/posts/original/1414_301a4.jpg);
  </code></pre>
  
  <p>Using <code>exec()</code> does not cause the new image to appear in the destination folder. However if I were to run the same command in the shell, it works perfectly!</p>
  
  <p>I believe this is a PATH problem. If so, how can I check the path that PHP is using, and how can I set the correct path in PHP?</p>