Re: IM Convert PDF->JPG works in command line, not in PHP
| From: | chris smith | Date: | Wed, 31 Dec 2008 23:38:11 +0000 |
| Subject: | Re: IM Convert PDF->JPG works in command line, not in PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-285311@lists.php.net to get a copy of this message | ||
> But from PHP, it only works beautifully if I specify complete pathnames for
> convert
/usr/local/imagemagick/ is not in apache's $PATH, so you need to
specify the full location.
> As soon as I try to convert a PDF
> image, it fails:
>
> <?php
> $command_line = "/usr/local/imagemagick/bin/convert
> /var/www/html/original.pdf /var/www/new.jpg";
> system($command_line, $return_var);
Try using exec() so you get the whole return message, might be
something useful in there.
exec($command_line, $return_output, $return_code);
--
Postgresql & php tutorials
http://www.designmagick.com/