English 中文(简体)
phpThumb cannot find ImageMagick / Imagick
原标题:

I m having a problem with phpThumb. It says in the documentation that to get the best out of it, use ImageMagick / Imagick.

I ve got this installed on the Server (running Centos 5.1), and can run convert --version and get the right info back. I can also run which convert which returns /usr/bin/convert

However, phpThumb can t location the convert program - the demo s show that:

(requires ImageMagick, this server is running "n/a" so it will not work)

Does anyone have any pointers on how to fix this?

Cheers,
Matt

问题回答

ImageMagick changed the way it reports the version, and phpThumb no longer recognizes the version info.

From:

Version: ImageMagick 6.3.7 06/04/09 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

To:

Version: ImageMagick 6.6.2-6 2010-12-02 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC

There are now DASHES in the version! This is a simple fix, open phpthumb.class.php look for the line:

if (eregi( ^Version: [^0-9]*([ 0-9\.\:Q/]+) (http|file): , $versionstring[1], $matches)) {

Simply add a dash - after the Q/ and it will work. New line:

if (eregi( ^Version: [^0-9]*([ 0-9\.\:Q/-] (http|file): , $versionstring[1], $matches)) {

Have you checked phpinfo() to make sure imagick is installed? If not, you will need to install it.

ImageMagick Install Instructions

The problem with phpThumb is often not a missing ImageMagick problem, but a problem with access to the exec function, because phpThumb is using binaries (convert) to create thumbnails. Make sure You have seen this http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=phpThumb and http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-1598





相关问题
phpThumb cannot find ImageMagick / Imagick

I m having a problem with phpThumb. It says in the documentation that to get the best out of it, use ImageMagick / Imagick. I ve got this installed on the Server (running Centos 5.1), and can run ...

Properly converting a CMYK image to RGB with RMagick

I have been using the below to do a color conversion if @image.colorspace == Magick::CMYKColorspace # @image.colorspace #=> CMYKColorspace=12 @image.colorspace = Magick::...

Imagemagick convert pdf to png

I am rather new to using the command line and php. That being said I have been trying to figure out how to use ImageMagick with the exec() function. I have this currently, $command="/usr/local/lib/...

ImageMagick failing to convert to JPG

We recently installed the latest version of ImageMagick onto our Linux server. I seem to be having issues performing the most basic of tasks. I am running this command line: /usr/bin/convert /...

热门标签