Re: IM Convert PDF->JPG works in command line, not in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux