Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-27-2009, 05:40 AM
|
#1
|
LQ Newbie
Registered: Jul 2009
Posts: 16
Rep:
|
Imagemagick and Imagick
We have a website which uses imagick/imagemagick to create thumbnails from a PDF. One day it stopped working, generating the error "Delegate failed".
We've asked out hosting company to look into it, and they've tried all they can. We've had our PHP code checked and it seems to be fine. We hadn't changed anything when the site stopped working.
What we want to do now, is remove the current version of imagemagick and imagick, and re-install the latest versions. Currently we have v2.2.0 of imagick installed, and the latest stable version is 2.2.2.
We're running Centos and Plesk.
Could someone assist me in removing these applications and re-installing please?
|
|
|
07-27-2009, 08:40 AM
|
#2
|
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,462
|
Hi
Also check ghostscript. Imagemagick uses it, and the "Delegate failed" is probably Ghostscript. I would make a PHP page with passthru("gs -v") and see if it is still installed.
You can also get this error message on corrupt PDF files, so if it tries again and again on the same PDF, it could be the reason.
|
|
|
07-28-2009, 03:31 PM
|
#3
|
LQ Newbie
Registered: Jul 2009
Posts: 16
Original Poster
Rep:
|
Quote:
Originally Posted by Guttorm
Hi
Also check ghostscript. Imagemagick uses it, and the "Delegate failed" is probably Ghostscript. I would make a PHP page with passthru("gs -v") and see if it is still installed.
You can also get this error message on corrupt PDF files, so if it tries again and again on the same PDF, it could be the reason.
|
When I do that I get;
"ESP Ghostscript 8.15.2 (2006-04-19) Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved."
|
|
|
07-28-2009, 04:12 PM
|
#4
|
LQ Newbie
Registered: Jul 2009
Posts: 16
Original Poster
Rep:
|
I've looked around the internet a bit more, and there's a suggestion that gs isn't in the apache path. It seems to be in the /usr/bin folder, is that within the apache path?
|
|
|
07-29-2009, 04:48 AM
|
#5
|
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,462
|
Hi
Well it is in the path, otherwise "gs -v" would have failed.
Imagemagick's convert has an option called -verbose. It displays the ghostscript command as well as other things. Maybe you will get a better error message or some other hints about what the problem is?
convert -verbose somefile.pdf /tmp/somefile.png
By the way, imagick is a PHP module and imagemagick is a set of command line tools. So even if the command line tools work, there might be something wrong about imagick. Do you know anything about how these thumbnails are made? If this is a web application coded by someone else, it could be it uses imagick if installed, otherwise imagemagick. So disabling the imagick module might help, it would we slightly slower, but not very much.
|
|
|
07-30-2009, 04:07 AM
|
#6
|
LQ Newbie
Registered: Jul 2009
Posts: 16
Original Poster
Rep:
|
Quote:
Originally Posted by Guttorm
Hi
Well it is in the path, otherwise "gs -v" would have failed.
Imagemagick's convert has an option called -verbose. It displays the ghostscript command as well as other things. Maybe you will get a better error message or some other hints about what the problem is?
convert -verbose somefile.pdf /tmp/somefile.png
By the way, imagick is a PHP module and imagemagick is a set of command line tools. So even if the command line tools work, there might be something wrong about imagick. Do you know anything about how these thumbnails are made? If this is a web application coded by someone else, it could be it uses imagick if installed, otherwise imagemagick. So disabling the imagick module might help, it would we slightly slower, but not very much.
|
The PDF converts fine from the command line, i.e. using convert. The problem is via PHP which is using Imagick, which as you say in a PHP module.
The problem is, Imagick is running imagemagick, and it's imagemagick that passing the error back, rather than Imagick.
I'm at a loose end with this problem, and think I'll probably have to recode the application to run a command via exec rather than going through imagick.
|
|
|
07-30-2009, 06:56 AM
|
#7
|
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,462
|
I did the same some time ago. Imagick crashed for mysterious reasons and I think the documentation was horrible. Using exec isn't much slower and it became a lot more stable.
|
|
|
All times are GMT -5. The time now is 05:19 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|