SPECIFICATIONS
OS ~ FreeBSD 10 64bit
PHP ~ 5.5.14
ImageMagick ~ 6.8.9.4
Pecl-Imagick ~ 3.1.2
TEST SCRIPT
Code: Select all
<?php
$path = '/tmp/in.pdf';
$pdf = new Imagick($path);
$pdf->setImageFormat('jpg');
$pdf->writeImage('/tmp/out.jpg');
?>
Code: Select all
Fatal error: Uncaught exception 'ImagickException' with message 'Unable to read the file: /tmp/in.pdf' in /usr/local/www/test.php:3 Stack trace: #0 /usr/local/www/test.php(3): Imagick->__construct('/tmp/in.pdf') #1 {main} thrown in /usr/local/www/test.php on line 3
* PDF to JPG using PHP on the CommandLine > works
* PDF to JPG using PHP-FPM from browser > doesn't work (error above)
* JPG to PDF using PHP-FPM from browser > works