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

问题描述

我收到错误消息找不到类'Imagick'".我需要以某种方式使该库可用于php.我在Fedora 8上使用的是PHP 5.2.6.我的php_info没有提及ImageMagick.

I am getting the error "Class 'Imagick' not found". Somehow I need to make this library accessible to php. I am using Php 5.2.6 on Fedora 8. my php_info has no mention of ImageMagick.

我已经尝试过:yum安装ImageMagick并重新启动apache,这是行不通的.

I have tried: yum install ImageMagick and restarted apache, which didn't work.

我还向我的php.ini文件中添加了extension = imagick.ext并重新启动了apache,这是行不通的.

I also added extension=imagick.ext to my php.ini file and restarted apache, which didn't work.

推荐答案

来自: http://news.ycombinator.com/item?id=1726074

对于基于RHEL的i386发行版:

For RHEL-based i386 distributions:

yum install ImageMagick.i386
yum install ImageMagick-devel.i386
pecl install imagick
echo "extension=imagick.so" > /etc/php.d/imagick.ini
service httpd restart

这也可以使用yum软件包管理器在其他i386发行版上运行.对于x86_64,只需将.i386替换为.x86_64

This may also work on other i386 distributions using yum package manager. For x86_64, just replace .i386 with .x86_64

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

08-07 06:27