saros

Active Member
Aug 28, 2013
30
0
6
cPanel Access Level
Root Administrator
I'm trying to install the module imagick.

error:

Code:
Installing PHP Pecl "imagick"

downloading imagick-3.0.1.tgz ...
Starting to download imagick-3.0.1.tgz (93,920 bytes)
.....................done: 93,920 bytes
13 source files, building
running: phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
Please provide the prefix of Imagemagick installation [autodetect] : building in /root/tmp/pear/pear-build-rootzXOC6S/imagick-3.0.1
running: /root/tmp/pear/imagick/configure --with-imagick
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20100525
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable the imagick extension... yes, shared
checking whether to enable the imagick GraphicsMagick backend... no
checking ImageMagick MagickWand API configuration program... found in /usr/bin/MagickWand-config
checking if ImageMagick version is at least 6.2.4... found version 6.5.4 Q16
checking for MagickWand.h header file... found in /usr/include/ImageMagick/wand/MagickWand.h
checking PHP version is at least 5.1.3... yes. found 5.4.19
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1966080
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /root/tmp/pear/pear-build-rootzXOC6S/imagick-3.0.1/libtool --mode=compile cc  -I. -I/root/tmp/pear/imagick -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootzXOC6S/imagick-3.0.1/include -I/root/tmp/pear/pear-build-rootzXOC6S/imagick-3.0.1/main -I/root/tmp/pear/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick  -DHAVE_CONFIG_H  -g -O2   -c /root/tmp/pear/imagick/imagick_class.c -o imagick_class.lo
mkdir .libs
 cc -I. -I/root/tmp/pear/imagick -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootzXOC6S/imagick-3.0.1/include -I/root/tmp/pear/pear-build-rootzXOC6S/imagick-3.0.1/main -I/root/tmp/pear/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/imagick/imagick_class.c  -fPIC -DPIC -o .libs/imagick_class.o
/root/tmp/pear/imagick/imagick_class.c: In function 'zim_imagick_setfont':
/root/tmp/pear/imagick/imagick_class.c:1442: error: 'struct _php_core_globals' has no member named 'safe_mode'
/root/tmp/pear/imagick/imagick_class.c:1442: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/root/tmp/pear/imagick/imagick_class.c:1442: error: (Each undeclared identifier is reported only once
/root/tmp/pear/imagick/imagick_class.c:1442: error: for each function it appears in.)
/root/tmp/pear/imagick/imagick_class.c:1442: error: 'CHECKUID_NO_ERRORS' undeclared (first use in this function)
/root/tmp/pear/imagick/imagick_class.c: In function 'zim_imagick_setimageprogressmonitor':
/root/tmp/pear/imagick/imagick_class.c:9534: error: 'struct _php_core_globals' has no member named 'safe_mode'
/root/tmp/pear/imagick/imagick_class.c:9534: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/root/tmp/pear/imagick/imagick_class.c:9534: error: 'CHECKUID_NO_ERRORS' undeclared (first use in this function)
make: *** [imagick_class.lo] Error 1
ERROR: `make' failed
The imagick.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20100525
Tidying /usr/local/lib/php.ini...
No changes
Tidying /usr/local/cpanel/3rdparty/php/53/etc/php.ini...
No changes
latest version of cpanel
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

Is PHP version 5.4 installed on this system? If so, there is a known compatibility issue with the Imagick PECL module and PHP 5.4. As a workaround, please try running the following commands to utilize the beta version:

Code:
pear config-set preferred_state beta
pecl install imagick
Thank you.
 

saros

Active Member
Aug 28, 2013
30
0
6
cPanel Access Level
Root Administrator
Yes php5.4 (Default cpanel) Successful installation...

imagick some errors

log error:

Code:
[28-Aug-2013 20:14:09 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/magickwand.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/magickwand.so: cannot open shared object file: No such file or directory in Unknown on line 0
[28-Aug-2013 20:14:09 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
[28-Aug-2013 20:14:09 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[28-Aug-2013 20:14:09 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
[28-Aug-2013 20:14:09 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
[28-Aug-2013 20:14:09 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[28-Aug-2013 20:14:09 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/ixed.5.2.lin' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/ixed.5.2.lin: cannot open shared object file: No such file or directory in Unknown on line 0
[28-Aug-2013 20:14:09 UTC] PHP Fatal error:  Directive 'allow_call_time_pass_reference' is no longer available in PHP in Unknown on line 0
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Could you verify if you completed the installation with the steps in my last post to this thread? Are the new error messages you posted after the installation? If so, check to see if you have a custom php.ini within the account that you notice those error messages on. Try disabling it so the account uses the system php.ini file.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
To confirm, there was an individual php.ini file within the account and you have disabled it? Could you upload a PHPINFO file to the account and verify which php.ini file the account is using?

Thank you.
 

madsere

Well-Known Member
Apr 7, 2004
49
3
158
cPanel Access Level
DataCenter Provider
Running your commands throws an error here:

Code:
checking whether to enable the imagick extension... yes, shared
checking whether to make Imagick respect PHP memory limits... no
checking for pkg-config... /usr/bin/pkg-config
checking ImageMagick MagickWand API configuration program... configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
ERROR: `/root/tmp/pear/imagick/configure --with-imagick' failed
Current version.
 

madsere

Well-Known Member
Apr 7, 2004
49
3
158
cPanel Access Level
DataCenter Provider
Already installed, but still ...

Code:
# rpm -qa | grep ImageMagick
ImageMagick-perl-6.2.8.0-15.el5_8
cpanel-ImageMagick-6.8.0-2.cp1136
ImageMagick-devel-6.2.8.0-15.el5_8
ImageMagick-c++-6.2.8.0-15.el5_8
ImageMagick-6.2.8.0-15.el5_8
ImageMagick-c++-devel-6.2.8.0-15.el5_8
ImageMagick-c++-devel-6.2.8.0-15.el5_8
ImageMagick-6.2.8.0-15.el5_8
ImageMagick-c++-6.2.8.0-15.el5_8
ImageMagick-devel-6.2.8.0-15.el5_8
Code:
# pecl install imagick
downloading imagick-3.2.0RC1.tgz ...
Starting to download imagick-3.2.0RC1.tgz (163,503 bytes)
...................................done: 163,503 bytes
16 source files, building
running: phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
Please provide the prefix of Imagemagick installation [autodetect] :
building in /root/tmp/pear/pear-build-rootQBTiNM/imagick-3.2.0RC1
running: /root/tmp/pear/imagick/configure --with-imagick
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20100525
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... invalid
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable the imagick extension... yes, shared
checking whether to make Imagick respect PHP memory limits... no
checking for pkg-config... /usr/bin/pkg-config
checking ImageMagick MagickWand API configuration program... found in /usr/bin/Wand-config
checking if ImageMagick version is at least 6.2.4... found version 6.2.8
checking for MagickWand.h or magick-wand.h header... configure: error: Unable to find MagickWand.h or magick-wand.h header
ERROR: `/root/tmp/pear/imagick/configure --with-imagick' failed
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
The output you provided does not show that you ran the "pear config-set preferred_state beta" command. If you did, then feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

Thank you.