ImageMagick greyed out
-
Just installed ImageMagick extension on our server, but the checkbox is still greyed out in Document Gallery settings. Wanted to use this instead of Google Doc viewer and for video thumbs.
-
Hi nortonagency,
All of the testing for whether Imagick is available is actually done within WordPress core (this is the method: https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-image-editor-imagick.php#L42). The testing for whether Imagick is usable covers a lot of different aspects, so I can’t really help in narrowing down why the option is not available for you other than to suggest that you work through the various things being tested in the link above and see where it is failing.
I’m sorry I can’t be of more help! ??
-Dan
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! ??
It’s failing at line 17:
https://chicagobrickoven.com/wp-includes/class-wp-image-editor-imagick.phpAny help would be appreciated.
Hi nortonagency,
That exception is due to the page being loaded directly (which is not the intended use). You could add a line at the top of that file to fix that issue:
include ABSPATH . 'wp-includes/class-wp-image-editor.php';
You may run into other issues once that is fixed. You also don’t want to leave that change, but if you’re trying to test things, that should get you going. Beyond that, I really don’t know what to tell you. If WordPress is not finding Imagick, then Document Gallery will not either.
All the best,
DanI wanted to add that my Imagemagic checkbox is greyed out too and I contacted my website provider World4You and they say Imagemagic is activated correctly and it’s a problem with the plugin. The path to Imagemagick is “/usr/bin/php_safemode” but the plugin doesn’t even give me an option to change that (in case that path is unusual).
Haniball, your website provider is mistaken.
It’s completely possible there is a bug, but it’s not in Document Gallery. That logic directly invokes WordPress core code so there’s no place for the issue to happen on our end.
If someone wants to give me access to their server then I can take a look at specifically what is happening, but if it is a bug you’ll have to file that with WordPress.
If one of you is comfortable giving me access to your server, you can email credentials here: https://dan.rossiters.org/contact-me/
-Dan
Hello Dan. Thanks for your offer!
I can’t give you access to that specific server because it is not mine but I should have the same package at the same hoster. I wanted to give you a test environment but I noticed that the GhostScript checkbox is available on my server. I contacted World4You again and asked again if this is really not a configuration problem. I’ll keep you up2date. I guess it doesn’t matter if I have imagemagick or ghostscript, right? I would maily need it for PDF documents and images with previews.
One more thing… Currently the site that has the problem is in a wordpress subdirectory. Could this make the difference?Hi haniball,
Yes, you can and in fact should use Ghostscript if it is an option. Conversions will be significantly faster, especially with larger documents.
In debugging the IMagick issues, if I send you a modified version of the WP file that will log where the failure happens, would you be willing to run that on your system? I can throw that together pretty quickly and it would tell us exactly where your IMagick is failing to meet WordPress tests.
All the best,
DanThis would be great! I’ve sent you an email via the contact link you gave me earlier. please send me the debugging file via mail.
Great!
The modified image editor will log the reason for the test failing to the built in Document Gallery logging interface.
After copying the modified file to your server, view the page where the checkbox is grayed out in order to trigger the test, then view the bottom of the logging tab where one or more reasons for failure should be logged.
The modified file can be found here: https://pastebin.com/mRqtLaBw. I’ll also reply to your email with the link.
-Dan
PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! ??
I’m going to mark this issue as resolved. Anyone who believes IMagick should be enabled on their server, but does not the checkbox enabled is encouraged to use the test code linked to above and send the results to their host requesting that the IMagick PHP plugin be enabled on their system.
All the best,
DanPS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! ??
Thanks for your e-mail support. To make this thread complete, here is what helped me:
Couldn’t get IMagick to work and I think that’s my hoster’s fault BUT the ghostscript path was recognized on one server automatically and on the other not. I think it’s because of my wordpress subdirectory. I copied the path “/usr/bin/gs” to the advanced tab of document gallery deleted the failed thumbnails and it worked ??
- The topic ‘ImageMagick greyed out’ is closed to new replies.