I've for php 5.6.23 running in a freebsd jail with imagemagick installed.
I have a file (777) in the root called in.php.
If I run the following in a command line it converts it fine
Code: Select all
convert in.pdf out.png
Code: Select all
$path = '/mnt/web/LandCruiserClub/in.pdf';
print "Readable:" . is_readable($path) . "|<br>";
print "path: " . $path . "<br />";
print "file exists." . file_exists($path) . "<br />";
$pdf = new Imagick($path.'[0]');
$pdf->setimageformat('jpg');
$pdf->writeimage('/mnt/web/LandCruiserClub/out.jpg');
Code: Select all
Fatal error: Uncaught exception 'ImagickException' with message 'Failed to read the file' in /mnt/web/LandCruiserClub/pi.php:18 Stack trace: #0 /mnt/web/LandCruiserClub/pi.php(18): Imagick->__construct('in.pdf[0]') #1 {main} thrown in /mnt/web/LandCruiserClub/pi.php on line 18
Thanks
Image Magick:
Code: Select all
imagick
imagick module enabled
imagick module version 3.4.1
imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version ImageMagick 6.9.4-3 Q16 amd64 2016-07-14 http://www.imagemagick.org
Imagick using ImageMagick library version ImageMagick 6.9.4-3 Q16 amd64 2016-07-14 http://www.imagemagick.org
ImageMagick copyright Copyright (C) 1999-2016 ImageMagick Studio LLC
ImageMagick release date 2016-07-14
ImageMagick number of supported formats: 229
ImageMagick supported formats 3FR, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, FAX, FITS, FPX, FRACTAL, FTS, G3, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X3F, XBM, XC, XCF, XPM, XPS, XV, YCbCr, YCbCrA, YUV