Control Web Panel

WebPanel => PHP => Topic started by: tedeu on March 23, 2015, 01:15:49 PM

Title: Install ImageMagick or GD ?
Post by: tedeu on March 23, 2015, 01:15:49 PM
Hi,
How can I install ImageMagick or GD ?
Title: Re: Install ImageMagick or GD ?
Post by: brijendrasial on March 23, 2015, 01:31:19 PM
Imagick can be installed using the instruction below. This script is already available on server at /usr/local/cwpsrv/htdocs/resources/scripts/install_imagick

Quote
yum -y install ImageMagick ImageMagick-devel ImageMagick-perl
cd /usr/local/src
rm -Rf imagick-3.1.0RC2
rm -Rf imagick-3.1.0RC2.tgz
wget http://pecl.php.net/get/imagick-3.1.0RC2.tgz
tar zxf imagick-3.1.0RC2.tgz
cd imagick-3.1.0RC2
phpize
ln -s /usr/local/include/ImageMagick-6 /usr/local/include/ImageMagick
./configure
make clean
make
make install
echo ""
grep "imagick.so" /usr/local/php/php.ini || echo "extension=imagick.so" >> /usr/local/php/php.ini
Title: Re: Install ImageMagick or GD ?
Post by: tedeu on March 23, 2015, 02:06:05 PM
I am trying now.
And GD ?
Title: Re: Install ImageMagick or GD ?
Post by: brijendrasial on March 23, 2015, 02:35:23 PM
GD is pre compiled.
Title: Re: Install ImageMagick or GD ?
Post by: tedeu on March 26, 2015, 09:10:17 AM
Thanks.
The ImageMagick info worked like a charm.
You are good
Title: Re: Install ImageMagick or GD ?
Post by: Administrator on March 26, 2015, 12:37:34 PM
from version 0.9.8.4 CWP has also scripts included so you can install it very simple by using command on your server

Code: [Select]
sh /scripts/install_imagick
Title: Re: Install ImageMagick or GD ?
Post by: diessays on September 02, 2015, 06:14:58 PM
from version 0.9.8.4 CWP has also scripts included so you can install it very simple by using command on your server

Code: [Select]
sh /scripts/install_imagick

1st fresh install of centos  6.6
2nd fresh install of cwp
3rd switched php version to 5.2.17
4th used
Code: [Select]
sh /scripts/install_imagick
result at the end is
Quote
Build complete.
Don't forget to run 'make test'.

Installing shared extensions:     /usr/lib64/extensions/no-debug-non-zts-20060613/
Installing header files:          /usr/local/include/php/

PHP Warning:  PHP Startup: Unable to load dynamic library './imagick.so' - ./imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
Imagick NOT Installed !

This process work for php 5.4 but I need imagick for php 5.2

Title: Re: Install ImageMagick or GD ?
Post by: keyjey on January 12, 2016, 12:42:04 PM
Same issue here, after running script scripts/install_imagick:

extension=imagick.so PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/
extensions/no-debug-non-zts-20100525/imagick.so' - /usr/lib64/extensions/no-debug-non-zts-20100525/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0

Imagick NOT Installed !

What can you suggest ?

Thanks
Title: Re: Install ImageMagick or GD ?
Post by: Administrator on January 17, 2016, 02:03:58 AM
contact support and we will check it
http://centos-webpanel.com/contact
Title: Re: Install ImageMagick or GD ?
Post by: batgranny on March 02, 2016, 03:59:51 PM
Same issue here, after running script scripts/install_imagick:

extension=imagick.so PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/
extensions/no-debug-non-zts-20100525/imagick.so' - /usr/lib64/extensions/no-debug-non-zts-20100525/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0

Imagick NOT Installed !

This also happened to me.  Is there a fix for this?

Thanks
Title: Re: Install ImageMagick or GD ?
Post by: batgranny on March 03, 2016, 02:54:02 PM

This also happened to me.  Is there a fix for this?

Thanks

Actually, looking at it again it appears that this isn't the same issue.  When I run the /scripts/install_imagick It appears to build OK but I ge the error "Imagick NOT Installed !" at the end.  I can see the .so file in the right location and the extension has been added to the php.ini file OK, but when I look at a phpinfo() page I don't see the imagick extension loaded. Php -m also doesn't show it:

Code: [Select]
# php -m
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
ereg
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
openssl
pcntl
pcre
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
tokenizer
xml
zip
zlib

[Zend Modules]

The install log shows some warnings but no errors:

Code: [Select]
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_getimagematte’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:276: warning: ‘MagickGetImageMatte’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:82)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_paintfloodfillimage’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:1034: warning: ‘MagickPaintFloodfillImage’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:99)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:1037: warning: ‘MagickPaintFloodfillImage’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:99)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_recolorimage’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:1420: warning: ‘MagickRecolorImage’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:109)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_colorfloodfillimage’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:3423: warning: ‘MagickColorFloodfillImage’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:75)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_mapimage’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:3763: warning: ‘MagickMapImage’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:86)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_mattefloodfillimage’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:3796: warning: ‘MagickMatteFloodfillImage’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:88)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_medianfilterimage’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:3823: warning: ‘MagickMedianFilterImage’ is deprecated (declared at /usr/include/ImageMagick/wand/magick-image.h:212)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_paintopaqueimage’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:3886: warning: ‘MagickPaintOpaqueImageChannel’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:104)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_painttransparentimage’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:3949: warning: ‘MagickPaintTransparentImage’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:107)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_reducenoiseimage’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:4092: warning: ‘MagickReduceNoiseImage’ is deprecated (declared at /usr/include/ImageMagick/wand/magick-image.h:260)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_getimageattribute’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:5101: warning: ‘MagickGetImageAttribute’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:59)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_getimagechannelextrema’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:5288: warning: ‘MagickGetImageChannelExtrema’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:78)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_getimageextrema’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:5542: warning: ‘MagickGetImageExtrema’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:80)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_getimageindex’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:6383: warning: ‘MagickGetImageIndex’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:65)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_setimageindex’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:6408: warning: ‘MagickSetImageIndex’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:113)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_getimagesize’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:6486: warning: ‘MagickGetImageSize’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:140)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_setimageattribute’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:6835: warning: ‘MagickSetImageAttribute’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:111)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_flattenimages’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:7082: warning: ‘MagickFlattenImages’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:132)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_averageimages’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:8128: warning: ‘MagickAverageImages’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:131)
/usr/local/src/imagick-3.1.0RC2/imagick_class.c: In function ‘zim_imagick_mosaicimages’:
/usr/local/src/imagick-3.1.0RC2/imagick_class.c:8567: warning: ‘MagickMosaicImages’ is deprecated (declared at /usr/include/ImageMagick/wand/deprecate.h:135)

I'm at a loss, would anyone be able to shed any light on this?

Title: Re: Install ImageMagick or GD ?
Post by: batgranny on March 04, 2016, 08:55:52 AM
Не пойму, зачем такие сложности! (http://agrolinepro.ru/pictures-of-equipment)

I don't either, it seems as if the script works OK but something else is amiss.

Я тоже не понимаю , что кажется, будто скрипт работает нормально, но что-то другое неладно .
Title: Re: Install ImageMagick or GD ?
Post by: batgranny on March 10, 2016, 02:38:06 PM
OK So I managed to fix this.  In the Apache logs I was seeing this error:

Code: [Select]
PHP Warning:  PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20131226
These options need to match

It turns out that the version of php-cli that was installed was 5.3, which I could confirm on the command line:

Code: [Select]
# php -v
PHP 5.3.3 (cli) (built: Feb  9 2016 10:36:17)
Copyright (c) 1997-2010 The PHP Group

Whereas if I created a phpinfo(); file the version of PHP it said Apache was using was 5.6.14. This meant that when I ran scripts/install_imagick it was compiling imagick with an older version of PHP than was being used in Apache, which was causing it to crap out.

To fix it I had to add new repositories:

Code: [Select]
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

Remove PHP CLI:

Code: [Select]
yum remove php
yum remove  php-common

Then I did a yum search to find the correct version of PHP CLI and imagick to install.

Code: [Select]
yum install php56w-cli.x86_64 php56w-pecl-imagick.x86_64

I hope this helps someone!



Title: Re: Install ImageMagick or GD ?
Post by: siakbary on April 16, 2016, 11:45:59 PM
I also had problems when installing ImageMagick
Code: [Select]
[root@siakbary ~]# sh /scripts/install_imagick
CWP Imagick Installer
################################

Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.us.leaseweb.net
 * extras: mirror.us.leaseweb.net
 * rpmforge: mirror.teklinks.com
 * updates: mirror.us.leaseweb.net
Package ImageMagick-6.7.2.7-2.el6.x86_64 already installed and latest version
Package ImageMagick-devel-6.7.2.7-2.el6.x86_64 already installed and latest version
Package ImageMagick-perl-6.7.2.7-2.el6.x86_64 already installed and latest version
Nothing to do
--2016-04-16 19:43:02--  http://pecl.php.net/get/imagick-3.1.0RC2.tgz
Resolving pecl.php.net... 104.236.228.160
Connecting to pecl.php.net|104.236.228.160|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 93264 (91K) [application/octet-stream]
Saving to: `imagick-3.1.0RC2.tgz'

100%[===================================================================================================================================================================================================>] 93,264      --.-K/s   in 0.07s

2016-04-16 19:43:02 (1.35 MB/s) - `imagick-3.1.0RC2.tgz' saved [93264/93264]

Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20160303
Zend Extension Api No:   320160303
ln: creating symbolic link `/usr/local/include/ImageMagick': File exists
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-20160303
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.7.2 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 7.1.0-dev
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... no
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
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp.la       modules/* libs/*
/bin/sh /usr/local/src/imagick-3.1.0RC2/libtool --mode=compile cc  -I. -I/usr/local/src/imagick-3.1.0RC2 -DPHP_ATOM_INC -I/usr/local/src/imagick-3.1.0RC2/include -I/usr/local/src/imagick-3.1.0RC2/main -I/usr/local/src/imagick-3.1.0RC2 -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 /usr/local/src/imagick-3.1.0RC2/imagick_file.c -o imagick_file.lo
mkdir .libs
 cc -I. -I/usr/local/src/imagick-3.1.0RC2 -DPHP_ATOM_INC -I/usr/local/src/imagick-3.1.0RC2/include -I/usr/local/src/imagick-3.1.0RC2/main -I/usr/local/src/imagick-3.1.0RC2 -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 /usr/local/src/imagick-3.1.0RC2/imagick_file.c  -fPIC -DPIC -o .libs/imagick_file.o
/usr/local/src/imagick-3.1.0RC2/imagick_file.c: In function 'php_imagick_is_url':
/usr/local/src/imagick-3.1.0RC2/imagick_file.c:52: warning: passing argument 2 of 'php_stream_locate_url_wrapper' from incompatible pointer type
/usr/local/include/php/main/php_streams.h:565: note: expected 'const char **' but argument is of type 'char **'
/usr/local/src/imagick-3.1.0RC2/imagick_file.c: In function 'php_imagick_read_image_using_php_streams':
/usr/local/src/imagick-3.1.0RC2/imagick_file.c:156: error: 'ENFORCE_SAFE_MODE' undeclared (first use in this function)
/usr/local/src/imagick-3.1.0RC2/imagick_file.c:156: error: (Each undeclared identifier is reported only once
/usr/local/src/imagick-3.1.0RC2/imagick_file.c:156: error: for each function it appears in.)
make: *** [imagick_file.lo] Error 1
/bin/sh /usr/local/src/imagick-3.1.0RC2/libtool --mode=compile cc  -I. -I/usr/local/src/imagick-3.1.0RC2 -DPHP_ATOM_INC -I/usr/local/src/imagick-3.1.0RC2/include -I/usr/local/src/imagick-3.1.0RC2/main -I/usr/local/src/imagick-3.1.0RC2 -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 /usr/local/src/imagick-3.1.0RC2/imagick_file.c -o imagick_file.lo
 cc -I. -I/usr/local/src/imagick-3.1.0RC2 -DPHP_ATOM_INC -I/usr/local/src/imagick-3.1.0RC2/include -I/usr/local/src/imagick-3.1.0RC2/main -I/usr/local/src/imagick-3.1.0RC2 -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 /usr/local/src/imagick-3.1.0RC2/imagick_file.c  -fPIC -DPIC -o .libs/imagick_file.o
/usr/local/src/imagick-3.1.0RC2/imagick_file.c: In function 'php_imagick_is_url':
/usr/local/src/imagick-3.1.0RC2/imagick_file.c:52: warning: passing argument 2 of 'php_stream_locate_url_wrapper' from incompatible pointer type
/usr/local/include/php/main/php_streams.h:565: note: expected 'const char **' but argument is of type 'char **'
/usr/local/src/imagick-3.1.0RC2/imagick_file.c: In function 'php_imagick_read_image_using_php_streams':
/usr/local/src/imagick-3.1.0RC2/imagick_file.c:156: error: 'ENFORCE_SAFE_MODE' undeclared (first use in this function)
/usr/local/src/imagick-3.1.0RC2/imagick_file.c:156: error: (Each undeclared identifier is reported only once
/usr/local/src/imagick-3.1.0RC2/imagick_file.c:156: error: for each function it appears in.)
make: *** [imagick_file.lo] Error 1

extension=imagick.so
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20160303/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
Imagick NOT Installed !

What should I do?

info:
Code: [Select]
[root@siakbary ~]# curl http://dl1.centos-webpanel.com/files/s_scripts/sinfo.sh|sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
113   792  113   792    0     0   2638      0 --:--:-- --:--:-- --:--:--  7333
===============================================
Kernel:
Linux siakbary.my.id 2.6.32-042stab113.11 #1 SMP Fri Dec 18 17:32:04 MSK 2015 x86_64 x86_64 x86_64 GNU/Linux

CPU info:
model name      : Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz

Release:
CentOS release 6.7 (Final)

Arch:
x86_64

Virtualization Type:
openvz

Memory:
             total       used       free     shared    buffers     cached
Mem:          3072       1969       1102          5          0        993
-/+ buffers/cache:        975       2096
Swap:          768         75        692

MySQL info:
mysql  Ver 15.1 Distrib 10.1.13-MariaDB, for Linux (x86_64) using readline 5.1

Disk Info:
Filesystem         Size  Used Avail Use% Mounted on
/dev/ploop38139p1   59G  6.4G   50G  12% /
none               1.5G  4.0K  1.5G   1% /dev
none               1.5G     0  1.5G   0% /dev/shm

none    /dev/pts        devpts  rw,gid=5,mode=620       0       0
none    /dev/shm        tmpfs   defaults                0       0

Apache PHP info
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20160303/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 7.1.0-dev (cli) (built: Apr  8 2016 20:01:20) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies

Apache start script check
httpd=${HTTPD-/usr/local/apache/bin/httpd}

CWP Admin check
/usr/local/cwpsrv/htdocs/admin
===============================================

Title: Re: Install ImageMagick or GD ?
Post by: ripieces on May 10, 2016, 02:22:24 PM
Be sure to update your ImageMagic if users can upload images on your servers:
https://www.cvedetails.com/cve/CVE-2016-3714/
https://access.redhat.com/security/vulnerabilities/2296071
Title: Re: Install ImageMagick or GD ?
Post by: hrace009 on August 10, 2016, 09:11:40 AM
i have installed imagmagic success. with basic CWP php 5.4
i can see module loaded success.

but at subdomain, i run php7
i look at
Code: [Select]
<?php phpinfo();?> on php7, there is no imagmagic extension loaded.
i have try add
Code: [Select]
extension=imagick.so at php.ini and restart apache, still can't get it work with php7.
is there anyone can give me solution?

Thank You
Title: Re: Install ImageMagick or GD ?
Post by: Igor S. on August 10, 2016, 10:53:47 AM
Hi, try to use oldest version.
Title: Re: Install ImageMagick or GD ?
Post by: hrace009 on August 10, 2016, 02:42:17 PM
Hi, try to use oldest version.

yes, i know about that. but i want to use php7
seems the script only install for base php that use by cwp
Title: Re: Install ImageMagick or GD ?
Post by: hrace009 on August 10, 2016, 03:55:29 PM
with php selector php7 i got this error:
Code: [Select]
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/alt/php7/usr/lib/php/extensions/no-debug-non-zts-20160303/imagick.so' - /opt/alt/php7/usr/lib/php/extensions/no-debug-non-zts-20160303/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0if i change to default php, it has no problem
Title: Re: Install ImageMagick or GD ?
Post by: mouchoon on May 01, 2017, 03:26:37 AM
i am copy the imagemagik.so from -> /usr/local/lib/php/extensions/no-debug-non-zts-20131226
to -> /usr/lib64/extensions/no-debug-non-zts-20100525

and re install imagemagik : sh /scripts/install_imagick
problem solved!!

if same error for ffmpeg copy ffmpeg.so from ...........

Title: Re: Install ImageMagick or GD ?
Post by: MolodOr on June 07, 2018, 03:39:49 PM
-      2018  .    ?         ?
Title: Re: Install ImageMagick or GD ?
Post by: pixelpadre on December 04, 2018, 09:27:43 PM
contact support and we will check it
http://centos-webpanel.com/contact

Right and you ask for money in the spirit of open source.

Heres the error.
extension=imagick.so
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/ex                                                                                       tensions/no-debug-non-zts-20160303/imagick.so' - /usr/local/lib/php/extensions/n                                                                                       o-debug-non-zts-20160303/imagick.so: cannot open shared object file: No such fil                                                                                       e or directory in Unknown on line 0
Imagick NOT Installed !
Title: Re: Install ImageMagick or GD ?
Post by: Gogo on December 05, 2018, 04:43:44 AM
Right and you ask for money in the spirit of open source.

Where did you saw CWP is open source?
Title: Re: Install ImageMagick or GD ?
Post by: dblog1 on March 31, 2019, 12:44:28 AM
contact support and we will check it
http://centos-webpanel.com/contact

Right and you ask for money in the spirit of open source.

Heres the error.
extension=imagick.so
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/ex                                                                                       tensions/no-debug-non-zts-20160303/imagick.so' - /usr/local/lib/php/extensions/n                                                                                       o-debug-non-zts-20160303/imagick.so: cannot open shared object file: No such fil                                                                                       e or directory in Unknown on line 0
Imagick NOT Installed !


Hello, I manage to fix this with:
Code: [Select]
yum install gcc php-devel php-pear
yum install ImageMagick ImageMagick-devel
pecl install imagick
service httpd reload

Results:
Code: [Select]
[root@domain~]# php -v
PHP 5.6.37 (cli) (built: Mar 29 2019 15:49:35)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.3.2, Copyright (c) 2002-2018, by ionCube Ltd.
    with Zend Guard Loader v3.3, Copyright (c) 1998-2015, by Zend Technologies

No More Error with imagick
Title: Re: Install ImageMagick or GD ?
Post by: FreshLondon on October 14, 2020, 10:30:55 PM
also having issues when running the script:

Code: [Select]
checking if debug is enabled... no
checking if zts is enabled... no
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.9.10 Q16
checking for MagickWand.h header file... configure: error: Cannot locate header file MagickWand.h
make: *** No rule to make target `clean'.  Stop.
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.

PHP Warning:  PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20190902/imagick.so (/usr/local/lib/php/extensions/no-debug-non-zts-20190902/imagick.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20190902/imagick.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20190902/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Imagick NOT Installed !
[root@host ~]#
Title: Re: Install ImageMagick or GD ?
Post by: aamirrajpoot on May 21, 2021, 01:42:55 PM
Wow so long, here is how I solved the issue,

Code: [Select]
yum -y install ImageMagick ImageMagick-devel ImageMagick-perl
cd /usr/local/src
rm -Rf imagick-3.4.4
rm -Rf imagick-3.4.4.tgz
wget http://pecl.php.net/get/imagick-3.4.4.tgz
tar zxf imagick-3.4.4.tgz
cd imagick-3.4.4
phpize
ln -s /usr/include/ImageMagick-6 /usr/local/include/ImageMagick

./configure --with-php-config=/opt/alt/php-fpm73/usr/bin/php-config
make clean
make
make install
echo ""
grep "imagick.so" /opt/alt/php-fpm73/usr/php/php.ini || echo "extension=imagick.so" >> /opt/alt/php-fpm73/usr/php/php.ini
php -m|grep imagick && echo "Imagick Installed, please restart apache to load changes !" || echo "Imagick NOT Installed !"

Notes:

1. I have used the latest version
2. In the scripts like `ln -s /usr/local/include/ImageMagick-6 /usr/local/include/ImageMagick` was wrong. I have fixed the paths

I have PHP-FPM Multiple versions installed and installed it to only PHP-FPM73

I hope this solves some users issues