title: ImageMagick: how to provide Image generation directory path?
body: <p>I am using ImageMagick <a href="http://www.imagemagick.org/Usage/text/#caption_bestfit" rel="nofollow">Caption Best Fit</a> in my code to generate a best fit text image.</p>
  
  <p>PHP Code:</p>
  
  <pre><code>$tempPath = realpath(APPLICATION_PATH . '/../public/temp');
  $command = 'convert -background none -fill black -pointsize '.$captionFontSize.' -size '.$resizeBoxWidth.'x'.$resizeBoxHeight.' caption:"'.$myCaption.'" '.$tempPath.'/'.$randName.'.png';
  $ex = exec($command);
  </code></pre>
  
  <p>It all works fine in my localhost running xampp on windows. It creates the image in the public/temp directory perfectly. The same code is not working fine on my hosting server running linux. The problem is the command is not executing due to which the image is not generated.</p>
  
  <p>I google, if my way of specifying the path is correct but i am not getting any correct answers.</p>
  
  <p>What do you think is the problem ?
  Thank you.</p>