LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 07-27-2009, 05:40 AM   #1
littlened
LQ Newbie
 
Registered: Jul 2009
Posts: 16

Rep: Reputation: 0
Question 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?
 
Old 07-27-2009, 08:40 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,462

Rep: Reputation: 450Reputation: 450Reputation: 450Reputation: 450Reputation: 450
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.
 
Old 07-28-2009, 03:31 PM   #3
littlened
LQ Newbie
 
Registered: Jul 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Guttorm View Post
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."
 
Old 07-28-2009, 04:12 PM   #4
littlened
LQ Newbie
 
Registered: Jul 2009
Posts: 16

Original Poster
Rep: Reputation: 0
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?
 
Old 07-29-2009, 04:48 AM   #5
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,462

Rep: Reputation: 450Reputation: 450Reputation: 450Reputation: 450Reputation: 450
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.
 
Old 07-30-2009, 04:07 AM   #6
littlened
LQ Newbie
 
Registered: Jul 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Guttorm View Post
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.
 
Old 07-30-2009, 06:56 AM   #7
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,462

Rep: Reputation: 450Reputation: 450Reputation: 450Reputation: 450Reputation: 450
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I have a problem Imagick Installation SSH linux0 Linux - Software 10 05-03-2009 04:55 AM
install ImageMagick-6.5.1-2 & ImageMagick-devel-6.5.1.2 in red hat mokkai Linux - Enterprise 4 04-16-2009 01:04 PM
Imagemagick barn63 Linux - Software 3 11-14-2006 03:44 PM
imagemagick++ oliem Linux - Desktop 1 09-05-2006 02:07 PM
php-imagick support for Red Hat 8.0 JLDixon Linux - Software 0 08-10-2004 02:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration