致命错误:找不到类"imagick" [英] Fatal error: Class 'imagick' not found

查看:596
本文介绍了致命错误:找不到类"imagick"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在WampServer 2下安装 imagemagic php扩展.

I am trying to install imagemagic php extension under WampServer 2.

  • 我已经下载并安装了ImageMagick.我选择了ImageMagick-6.8.8-10-Q16-x86-dll.exe

  • I've downloaded and installed ImageMagick . I've chosen ImageMagick-6.8.8-10-Q16-x86-dll.exe

我已经下载了php扩展名.

I've downloaded the php extension.

我已将刚刚下载的dll扩展名移至C:\ wamp \ bin \ php \ php5.4.16 \ ext \

I've moved the dll extension I just downloaded to C:\wamp\bin\php\php5.4.16\ext\

我更改了php.ini(可通过wamp托盘图标>右键单击> PHP> php.ini访问它),并在扩展名列表中添加了没有引号的"extension = php_imagick.dll".

I've altered php.ini (accessed it through wamp tray icon > right-click > PHP > php.ini) and added "extension=php_imagick.dll", without the quotes, to the extensions lists.

我重新启动了Apache.我没有注意到托盘图标中显示在PHP扩展列表中的扩展,而是重新启动了wampserver.现在,在列表中已启用ImageMagick扩展.

I restarted Apache. Not noticing the extension displayed on the PHP extensions list from the tray icon, I restarted the wampserver. ImageMagick extensions now shows enabled on the list.

但是,我不能使用它.快速测试将返回致命错误:找不到类'Imagick'".在phpinfo()中,仅显示imagemagick已添加到env变量中.

However, I cannot use it. Doing a quick test returns "Fatal error: Class 'Imagick' not found". In the phpinfo() shows only that the imagemagick has been added to env variables.

当我尝试测试imagick时:

when I try to test the imagick :

$im = new imagick( 'test.jpg' );
// resize by 200 width and keep the ratio
$im->thumbnailImage( 200, 0);
 // write to disk
$im->writeImage( 'test_thumbnail.jpg' );

我收到错误:Fatal error: Class 'imagick' not found 我究竟做错了什么? 我正在使用win7 32位,phph 5-4-16和apache2

I get the error:Fatal error: Class 'imagick' not found What am I doing wrong? I'm working with win7 32 bit, phph 5-4-16 and apache2

推荐答案

我唯一可行的方法是使用imagick的较旧版本:php_imagick-3.2.0b1-5.4-nts-vc9-x86.

The only way that I make it works is by using an older version of imagick:php_imagick-3.2.0b1-5.4-nts-vc9-x86.

这篇关于致命错误:找不到类"imagick"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆