在WAMP(Win7)上安装ImageMagick:找不到类

时间:2022-11-22 09:01:10

I've tried just about everything I've been able to find and so far nothing seems to work.

我已经尝试了一切我能找到的东西,到目前为止似乎没有任何效果。

Regardless of what I install, php always returns "Fatal error: Class 'Imagick' not found."

无论我安装什么,php总是返回“致命错误:未找到类'Imagick'。”

My system is:

我的系统是:

  • Win7, 64bit
  • Win7,64bit
  • Apache 2.2.21
  • Apache 2.2.21
  • PHP 5.3.10
    • PHP Extension Build: API20090626,TS,VC9
    • PHP扩展版本:API20090626,TS,VC9
  • PHP 5.3.10 PHP扩展版本:API20090626,TS,VC9

I've installed various versions of ImageMagick (6.6.7, 6.7.1, and 6.8.5, both x86 and x64), and used dll's (VC6 and VC9) from http://chernoivan.ru/tools/imagemagick-dlls.html, http://www.sk89q.com/2010/03/vc6-windows-binaries-for-imagick-2-3-0/, and http://valokuva.org/?m=201211.

我安装了各种版本的ImageMagick(6.6.7,6.7.1和6.8.5,x86和x64),并使用了来自http://chernoivan.ru/tools/imagemagick-dlls的dll(VC6和VC9) .html,http://www.sk89q.com/2010/03/vc6-windows-binaries-for-imagick-2-3-0/,和http://valokuva.org/?m=201211。

WAMP shows the extension as being activated (I added extension=php_imagick.dll to my php.ini file)

WAMP将扩展名显示为已激活(我将扩展名= php_imagick.dll添加到我的php.ini文件中)

phpinfo() though never shows anything specific to imagick besides some path variables and the script itself:

除了一些路径变量和脚本本身之外,phpinfo()从未显示任何特定的想象力:

<?php

header('Content-type: image/jpeg');

$image = new Imagick('image.jpg');

// If 0 is provided as a width or height parameter,
// aspect ratio is maintained
$image->thumbnailImage(100, 0);

echo $image;

?>

always says class not found.

总是说找不到课。

What could the problem at this point be?

那时问题到底是什么?

1 个解决方案

#1


0  

Discovered the problem.

发现了这个问题。

ImageMagick (at least from what I can tell) will not work on a x64 installation of php.

ImageMagick(至少从我能说的话)将无法在php的x64安装上运行。

Fix was to install a different version of WAMP with a x86 build of php.

修复是使用x86版本的php安装不同版本的WAMP。

Used the dll found here: http://www.peewit.fr/imagick/

使用这里找到的DLL:http://www.peewit.fr/imagick/

With ImageMagick-6.8.1-8-Q16-x64-dll.exe found here: http://image_magick.veidrodis.com/image_magick/binaries/

使用ImageMagick-6.8.1-8-Q16-x64-dll.exe:http://image_magick.veidrodis.com/image_magick/binaries/

#1


0  

Discovered the problem.

发现了这个问题。

ImageMagick (at least from what I can tell) will not work on a x64 installation of php.

ImageMagick(至少从我能说的话)将无法在php的x64安装上运行。

Fix was to install a different version of WAMP with a x86 build of php.

修复是使用x86版本的php安装不同版本的WAMP。

Used the dll found here: http://www.peewit.fr/imagick/

使用这里找到的DLL:http://www.peewit.fr/imagick/

With ImageMagick-6.8.1-8-Q16-x64-dll.exe found here: http://image_magick.veidrodis.com/image_magick/binaries/

使用ImageMagick-6.8.1-8-Q16-x64-dll.exe:http://image_magick.veidrodis.com/image_magick/binaries/