Softaculous


Topic : how to add imagick.so extension on php 5.6 webuzo


Posted By: ferdiyanto on January 16, 2015, 4:12 pm
dear admin,

How to add imagick.so to our php version? i need this extension for my web, please step by step.


Posted By: valley on January 19, 2015, 12:59 pm | Post: 1
You will have to compile the extension with the respective php version.


-----------------------
Webuzo : Single User Control Panel
Join Webuzo :
Facebook
Twitter


Posted By: ferdiyanto on January 20, 2015, 3:53 pm | Post: 2
Quote From : valley January 19, 2015, 12:59 pm
You will have to compile the extension with the respective php version.

i have try to install at command  line

# yum install ImageMagick ImageMagick-devel
# pecl install imagick
# echo "extension=imagick.so" > /etc/php.d/imagick.ini
# service httpd reload  (on this step failed to reload)

and after this i try to reboot our server but appear Aphace test page.
and try remove default apache and reinstall webuzo aphace, its back to normal but imagick.so not installed.

please help.

Posted By: valley on January 21, 2015, 6:10 am | Post: 3
You cannot use yum to install the module as it will install it at the default location.
You will have to download the source and compile it against php binaries located at /usr/local/apps/php53

Hope this helps :)

-----------------------
Webuzo : Single User Control Panel
Join Webuzo :
Facebook
Twitter


Posted By: ferdiyanto on January 22, 2015, 10:21 am | Post: 4
can i move the file from default location to /usr/local/apps/php53 ?

and whre the default directory of yum instalation?

Posted By: ferdiyanto on January 22, 2015, 10:44 am | Post: 5
i have run command:
# cd /usr/local/apps/php56/
# wget http://pecl.php.net/get/imagick-3.1.2.tgz

download complete...
after that how to install on dir /php56/ ?

sorry i am newbie.

Posted By: valley on January 23, 2015, 5:24 am | Post: 6
You can get the installation steps from imagemagick's website

Hope this helps.

-----------------------
Webuzo : Single User Control Panel
Join Webuzo :
Facebook
Twitter


Posted By: ferdiyanto on January 25, 2015, 2:35 pm | Post: 7
i don't have any steps from imagemagick website, but itry ru this command on SSH

after download file
#tar zxvf imagick-3.1.2.tgz  (ok work)
#cd imagick-3.1.2  (ok work)
#./configure    (not work)
#make    (not work)
#make install (not work)

please help i dont finish this installation steps for two weeks? urgent for my project...

Posted By: ferdiyanto on January 25, 2015, 2:37 pm | Post: 8
i don't have any steps from imagemagick website, but itry ru this command on SSH

after download file
#tar zxvf imagick-3.1.2.tgz  (ok work)
#cd imagick-3.1.2  (ok work)
#./configure    (not work)
#make    (not work)
#make install (not work)

please help i dont finish this installation steps for two weeks? urgent for my project...

Posted By: ferdiyanto on February 6, 2015, 11:50 pm | Post: 9
i have run
#make test
#make install

but view this

PHP        : /usr/bin/php
PHP_SAPI    : cli
PHP_VERSION : 5.3.3
ZEND_VERSION: 2.3.0
PHP_OS      : Linux - Linux ferdiyantodeni 2.6.32-504.3.3.el6.x86_64 #1 SMP Wed Dec 17 01:55:02 UTC 2014 x86_64
INI actual  : /usr/local/apps/php56/imagick-3.1.2/tmp-php.ini
More .INIs  :
CWD        : /usr/local/apps/php56/imagick-3.1.2
Extra dirs  :
VALGRIND    : Not used
=====================================================================
TIME START 2015-02-06 23:40:14
=====================================================================
No tests were run.
[root@ferdiyantodeni imagick-3.1.2]# make install
Installing shared extensions:    /usr/lib64/php/modules/
Installing header files:          /usr/include/php/
[root@ferdiyantodeni imagick-3.1.2]#

but after restart apache imagic not appear on php.info why?

Posted By: valley on February 11, 2015, 1:55 pm | Post: 10
use the headers as in /usr/local/apps

Use /usr/local/apps/php56/bin php instead of /usr/bin/php

Hope this helps

-----------------------
Webuzo : Single User Control Panel
Join Webuzo :
Facebook
Twitter


Posted By: noonedeadpunk on January 20, 2016, 7:31 pm | Post: 11
Hello,

Here is full instruction how to compile php imagick extension.

Firstly you need to install imagemagick from Webuzo -> Apps -> Utilites -> ImageMagick

Then enter server shell and execute following commands:

PHP Code

 #You will need to install some extra packages for module compilation (for CentOS)
yum install pkgconfig autoconf

#Enter directory with PHP version for which you would like to create imagick extension:
cd /usr/local/apps/php56/bin/

#Download extension using pecl (if you try to install it using pecl, then it will compile without any errors, but flush library after creation)
./pecl download imagick

#Untar extension sources and enter is directory (mention, that downloaded version of extension will change)
tar xf /usr/local/apps/php56/bin/imagick-3.3.0.tar
cd imagick
-3.3.0

#Run phpize
/usr/local/apps/php56/bin/phpize

#configure with providing paths to php-config and imagemagick install
./configure --with-php-config=/usr/local/apps/php56/bin/php-config --with-imagick=/usr/local/apps/imagemagick/

#Run it's compilation and installation
make && make install

#Add created extension to php config in order to enable module
echo "extension=/usr/local/apps/php56/lib/extensions/no-debug-non-zts-20131226/imagick.so" >> /usr/local/apps/php56/etc/php.d/extra.ini    

#Reload apache configuration
/usr/local/apps/apache2/bin/httpd -k graceful 


Posted By: valley on January 21, 2016, 4:26 am | Post: 12
Thanks for the useful information

-----------------------
Webuzo : Single User Control Panel
Join Webuzo :
Facebook
Twitter


Posted By: handell on January 22, 2016, 12:15 am | Post: 13
I have AMPPS running.
I have ImageMagick running command line on my mac.
However I cannot run ImageMagick with PHP?

Ive tried almost everything

Posted By: noonedeadpunk on January 22, 2016, 5:49 am | Post: 14
Imagemagick binary and php module imagick are quite different things. Php imagick uses imagemagick libraries for its work, but have a bit different functionality. You may use Imagemagick binary from php as well by shell_exec(), for example for converting images. but if you need exactly php imagick extension then you have to install it in addition.

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.