0

I had installed ImageMagick on my local server and it worked perfectly fine. But when I moved to webfaction, and tried installing it on the server I had issues. The ImageMagick is installed on the server but I am not able to install the php extension imagick. I followed the steps and downloaded the tar file from http://pecl.php.net/get/imagick-3.0.1.tgz. I then unzipped the file and its contents and configured it. I also did phpize. But when I did make I got the following errors:

[e@web308 imagick-3.0.1]$ make /bin/sh /home/e/temp/imagick-3.0.1/libtool --mode=compile cc -I. -I/home/e/temp/imagick-3.0.1 -DPHP_ATOM_INC -I/home/e/temp/imagick-3.0.1/include -I/home/e/temp/imagick-3.0.1/main -I/home/e/temp/imagick-3.0.1 -I/usr/local/include/php54 -I/usr/local/include/php54/main -I/usr/local/include/php54/TSRM -I/usr/local/include/php54/Zend -I/usr/local/include/php54/ext -I/usr/local/include/php54/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /home/e/temp/imagick-3.0.1/imagick_class.c -o imagick_class.lo mkdir .libs cc -I. -I/home/e/temp/imagick-3.0.1 -DPHP_ATOM_INC -I/home/e/temp/imagick-3.0.1/include -I/home/e/temp/imagick-3.0.1/main -I/home/e/temp/imagick-3.0.1 -I/usr/local/include/php54 -I/usr/local/include/php54/main -I/usr/local/include/php54/TSRM -I/usr/local/include/php54/Zend -I/usr/local/include/php54/ext -I/usr/local/include/php54/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /home/e/temp/imagick-3.0.1/imagick_class.c -fPIC -DPIC -o .libs/imagick_class.o /home/e/temp/imagick-3.0.1/imagick_class.c: In function ‘zim_imagick_setfont’: /home/e/temp/imagick-3.0.1/imagick_class.c:1442: error: ‘struct _php_core_globals’ has no member named ‘safe_mode’ /home/e/temp/imagick-3.0.1/imagick_class.c:1442: error: ‘CHECKUID_CHECK_FILE_AND_DIR’ undeclared (first use in this function) /home/e/temp/imagick-3.0.1/imagick_class.c:1442: error: (Each undeclared identifier is reported only once /home/e/temp/imagick-3.0.1/imagick_class.c:1442: error: for each function it appears in.) /home/e/temp/imagick-3.0.1/imagick_class.c:1442: error: ‘CHECKUID_NO_ERRORS’ undeclared (first use in this function) /home/e/temp/imagick-3.0.1/imagick_class.c: In function ‘zim_imagick_setimageprogressmonitor’: /home/e/temp/imagick-3.0.1/imagick_class.c:9534: error: ‘struct _php_core_globals’ has no member named ‘safe_mode’ /home/e/temp/imagick-3.0.1/imagick_class.c:9534: error: ‘CHECKUID_CHECK_FILE_AND_DIR’ undeclared (first use in this function) /home/e/temp/imagick-3.0.1/imagick_class.c:9534: error: ‘CHECKUID_NO_ERRORS’ undeclared (first use in this function) make: *** [imagick_class.lo] Error 1

It says some of the variables are undeclared. I tried with other versions and get the same errors.

Any help on what I might be doing wrong here?

Thanks in advance.

Derek 朕會功夫
  • 92,235
  • 44
  • 185
  • 247

2 Answers2

4

PHP54 won't work with version 3.0.1 you can use the latest version to fix this:

wget http://pecl.php.net/get/imagick-3.1.0RC2.tgz
tar xzvf imagick-3.1.0RC2.tgz
cd imagick-3.1.0RC2
phpize
./configure
make
cp modules/imagick.so /your-php-extensions-directory-path/
Mike Kormendy
  • 3,389
  • 2
  • 24
  • 21
0

The solution is to install the beta version of the module instead:

pear config-set preferred_state beta
pecl install imagick