title: PDF2SWF: php exec() only works in terminal
body: <p>Here is my code:</p>
  
  <pre><code>$pdf = '/Users/macbookpro/Desktop/q.pdf';
  $swf = '/Users/macbookpro/Desktop/q.swf';
  
  $command2 = 'pdf2swf -o '.$swf.' -T -z -t -f '.$pdf.' -s flashversion=9';
  exec($command2,$out,$status);
  var_dump($output);
  </code></pre>
  
  <p>The output is NULL and no SWF is generated. However, if I output the command and copy it to terminal, it works. How do I solve this?</p>