Fatal Error on Activation
-
Hi Mizuho,
I have confirmed with my Hosting company that both ImageMagick and GhostScript are installed no my server but when I try to Activate your plugin i get the following error message:
Please install “ImageMagick” and “GhostScript” before activate!
Any ideas?
-
Write this code to your functions.php and tel me the output.
if ( is_user_logged_in() ) { exec( 'convert -version', $out, $ver ); print_r($out); echo ' / $ver: '.$ver .' / gs version: '.shell_exec( 'gs --version' ); }Array ( ) 1 / $ver: 127 / gs version: 8.70
Error code 127 means like php can’t find imageMagick or you don’t have the authority of using the command. I think the best way is to confirm your host again.
I’ll chase them again and get back to you.
Thanks for the superfast support.
Hi Mizuho, my support say it’s working so I have checked the phpinfo and you can see it is enabled.
Any other ideas?
imagick
imagick module enabled
imagick module version 3.1.2
imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator
ImageMagick version ImageMagick 6.2.8 05/07/12 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
ImageMagick copyright Copyright (C) 1999-2006 ImageMagick Studio LLC
ImageMagick release date 05/07/12
ImageMagick number of supported formats: 149
ImageMagick supported formats A, ART, AVI, AVS, B, BMP, BMP2, BMP3, C, CACHE, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CUR, CUT, DCM, DCX, DNG, DOT, DPS, DPX, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, FAX, FITS, FRACTAL, G, G3, GIF, GIF87, GRADIENT, GRAY, HISTOGRAM, HTM, HTML, ICB, ICO, ICON, INFO, JNG, JPEG, JPG, K, LABEL, M, M2V, MAP, MAT, MATTE, MIFF, MNG, MONO, MPC, MPEG, MPG, MSL, MTV, MVG, NULL, O, OTB, OTF, P7, PAL, PALM, PAM, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PFA, PFB, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG24, PNG32, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSD, PTIF, PWP, R, RAS, RGB, RGBA, RGBO, RLA, RLE, SCR, SCT, SFW, SGI, SHTML, STEGANO, SUN, TEXT, TGA, TIFF, TILE, TIM, TTC, TTF, TXT, UIL, UYVY, VDA, VICAR, VID, VIFF, VST, WBMP, WPG, X, XBM, XC, XCF, XPM, XV, XWD, Y, YCbCr, YCbCrA, YUVDirective Local Value Master Value
imagick.locale_fix 0 0
imagick.progress_monitor 0 0Hi Mizuho, I don’t know if this helps but after running some tests using the following code (lines 42/43 of your plugin):
exec( ‘convert -version’, $out, $ver );
if ( $ver === 0 && count($out) > 2 ) {the count($out) returns an empty array?!?
What should this $out be checking against/returning?
Hi thefreshlab.
Thank you for reporting the situation.If “convert” command works well, $out has imageMagick version info.
Anyway, Imagick api may works well.
I changed the process of confirmation.
Try development version 1.3.9b.https://downloads.wordpress.org/plugin/pdf-image-generator.zip
Awesome thanks Mizuho, that has now fixed my issue and the images are being created as expected.
The only thing now is that it is not scaling the pdf as expected. Using your dummy pdf I get a hard crop from the top/left corner, 348x492px.
Can this be changed to scale the whole image to a maximum width an auto height?
Thanks for your superfast support ;o)
It is an unexpected result.
The plugin doesn’t command “crop” in default setting.
I’m not sure why, but it may be because of imagick version…Please uncheck “Customize Generated Image properties” in “PDF Image Generator Settings” page and upload pdf again.
That’s fixed the issue… Thank you so much for your help Mizuho.
Hi Mizuho, sorry but I have found one more issue…
If you upload a landscape PDF the cropping is in portrait mode – so the right-hand side is missing.
Is this expected and/or can it be fixed?
No, It’s not an expected behavior.
it may be because of imagick version,
It also may caused by a theme, plugins, or custom functions.Could you test “PDF Image Generator” with another theme and no other plugins on the same server?
After these test, If you get the same “terrible” result,
please send the images which are cropped via my contact form
and tell me the url of your website.http://web.contempo.jp/contact?lang=en
Thank you.
The topic ‘Fatal Error on Activation’ is closed to new replies.