ceynet

Member
Dec 30, 2007
5
0
51
hi all,
i'm trying to install the pecl, imagick, but it fails saying

/root/tmp/pear/imagick/imagick_helpers.c:912: error: `AddModulusEvaluateOperator' undeclared (first use in this function)
make: *** [imagick_helpers.lo] Error 1
ERROR: `make' failed
The imagick.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20060613

how can i solve this?

~viraj

further.. following is my imagemagick script outputs.. seems they are ok.

[[email protected] tmp]# /scripts/checkimagemagick
ok
[[email protected] tmp]# /scripts/installimagemagick
ImageMagick installed ok
[[email protected] tmp]#
 

ceynet

Member
Dec 30, 2007
5
0
51
solved with support from Jamyn from cpanel

here goes the thread..

[[email protected] ~]# convert -version
Version: ImageMagick 6.4.8 2009-07-30 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

[[email protected] ~]# /scripts/cleanimagemagick

As for the imagick extension; I also had a build failure using 2.3.x.
However, I downloaded and installed 2.2.x (from http://pecl.php.net/get/imagick-2.2.2.tgz) and it built just fine. So there's probably an issue with their code somewhere. Thanks!

--
[[email protected] imagick-2.2.2]# make install
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
[[email protected] imagick-2.2.2]#
 

trav91

Registered
Aug 2, 2009
2
0
51
cant understand the solution

hi sir
how do i install the 2.2.x?

could you elaborate on what to do first to resolve it? i am a stupid dumb noob :( thank you so much
 

eth00

Well-Known Member
PartnerNOC
Mar 30, 2003
721
1
168
NC
cPanel Access Level
Root Administrator
hi sir
how do i install the 2.2.x?

could you elaborate on what to do first to resolve it? i am a stupid dumb noob :( thank you so much
Grab the source, unzip it then:

perl Makefile.PL
make
make install


That should install it assuming something else is not having problems.
 

trav91

Registered
Aug 2, 2009
2
0
51
Grab the source, unzip it then:

perl Makefile.PL
make
make install


That should install it assuming something else is not having problems.


you mean via PuTTy? I'm doing it in putty bash.. :S
shouuld i wget.. or something? I really don't know anything :(
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
However, I downloaded and installed 2.2.x (from http://pecl.php.net/get/imagick-2.2.2.tgz) and it built just fine. So there's probably an issue with their code somewhere. Thanks!
Yes, there is a problem with the newest imagick build but if you roll back
to the release just before the "latest" then it will work just fine.

I have downloaded the newest and had to manually correct a substantial
amount of bad coding and missing file issues to get it to work correctly
so whoever uploaded that one, really messed things up.

However the earlier release works just fine and you don't have to do any
manual updating or fixes to get that one to work.

hi sir
how do i install the 2.2.x?

could you elaborate on what to do first to resolve it? i am a stupid dumb noob :( thank you so much
Ok, here is the basic rundown ....

Code:
# yum install ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make
# cd /usr/local/src
# wget http://pecl.php.net/get/imagick-2.2.2.tgz
# tar zxvf ./imagick-2.2.2.tgz
# cd imagick-2.2.2
# phpize
# ./configure
# make
# make test
# make install
That should build imagick as a loadable module and you should have a
line setup in your /usr/local/lib/php.ini file to load the imagick extension
like the following:
Code:
extension=imagick.so
(This was probably done for you when you did 'make install' though)

Alternate installation, you could hard compile this extention into PHP
putting it into the /ext folder in the PHP source and using the "--with-imagick"
configure flag but it sounds like that might be beyond what you are ready to
do so forget I mentioned it and the loadable module should work fine for you.
 
Last edited:

Solokron

Well-Known Member
Aug 8, 2003
852
2
168
Seattle
cPanel Access Level
DataCenter Provider
I have followed

/scripts/cleanimagemagick
and

# yum install ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make
# cd /usr/local/src
# wget http://pecl.php.net/get/imagick-2.2.2.tgz
# tar zxvf ./imagick-2.2.2.tgz
# cd imagick-2.2.2
# phpize
# ./configure
# make
# make test
# make install
and adding the following to the global php.ini file

extension=imagick.so
Access via perl works great, I am not showing the extension via PHP though in phpinfo or a php imagemagick verify script.

Any ideas?

I have also tried via whm...

WHM > Software > Module Installers > PHP Pecl > Install "imagick"
 
Last edited:

Aita

Member
Sep 16, 2010
14
0
51
Sweden
To install imagick > 2.2.2 one must manualy download and then edit imagick_helpers.c to coment out the code causing the error, then manualy install it.

This is what i did to get imagick 3.0.0 to work.

I do assume you have root access to the machine to install and compile and also that you do not have a previous pecl install of imagick

If you have not already installed ImageMagick, install it from console by running /scripts/installimagemagick

Download imagick 3.0.0

cd /usr/local/src
wget http://pecl.php.net/get/imagick-3.0.0.tgz
tar xzf imagick-3.0.0.tgz
cd imagick-3.0.0/

edit imagick_helpers.c using your favorite editor and coment out the lines 952, 953, 954 (actualy you can comment out the entire preprocessor macro statement)

phpize
./configure
make
make test
make install

edit /usr/local/lib/php.ini and add extension=imagick.so (add it where you other extentions are defined)

/scripts/restartsrv_httpd

Congratualations you now have imagick 3.0.0 :)