Gmagick extension for php install -- how and where?
Asked Answered
S

4

8

Downloaded php-pear and tried installing gmagick extension by following the steps given in link "http://www.gerd-riesselmann.net/development/how-install-imagick-and-gmagick-ubuntu"

The pecl gave an error --

gmagick-1.0.9b1$ pecl install gmagick

Failed to download pecl/gmagick within preferred state "stable", latest release is version 1.0.9b1, stability "beta", use "channel://pecl.php.net/gmagick-1.0.9b1" to install install failed


Tried adding the channel (no result)--

gmagick-1.0.9b1$ pecl channel-add http://pecl.php.net/package/gmagick/1.0.9b1

Error: No version number found in tag channel-add: invalid channel.xml file


Found the link "http://pecl.php.net/package/gmagick" to download the php extension untar'd it to find the following files --

gmagick-1.0.9b1$ ls

config.m4 gmagickdraw_methods.c gmagick_methods.c LICENSE php_gmagick_helpers.h README gmagick.c gmagick_helpers.c gmagickpixel_methods.c php_gmagick.h php_gmagick_macros.h

Tried . / config.m4 only to find more errors

gmagick-1.0.9b1$ . / config.m4

./config.m4: line 1: syntax error near unexpected token `gmagick,'
./config.m4: line 1: `PHP_ARG_WITH(gmagick, whether to enable the gmagick extension,'

Been at this since a day with no result.Read that gmagick is a swiss knife of image processing,sad that there isnt much documentation done on it or at least a proper how to install link anywhere.

Badly need help.

Thanks in advance.

Sydney answered 11/8, 2011 at 6:54 Comment(0)
S
1

Found the answer >>

shell> cd gmagick-1.0.9b1

shell> phpize

shell> ./configure

shell> make

shell> make install

Then,

Create file /etc/php/conf.d/imagick.ini and add a line "extension=imagick.so"

Reload Apache: sudo /etc/init.d/apache2 reload

For some reason,pecl never worked.but a combination of the links "http://www.gerd-riesselmann.net/development/how-install-imagick-and-gmagick-ubuntu" and the tutorial " helped me.

Sydney answered 11/8, 2011 at 18:57 Comment(0)
R
12

The following works for me on Kubuntu 11.04. First install the development files:

sudo apt-get install libgraphicsmagick1-dev

Then install GMagick for PHP:

sudo pecl install gmagick-1.1.1RC1

Finally load the extension in PHP:

sudo sh -c 'echo "extension=gmagick.so" >> /etc/php5/apache2/php.ini'
sudo service apache2 restart
Repudiate answered 5/1, 2012 at 15:54 Comment(0)
S
1

Found the answer >>

shell> cd gmagick-1.0.9b1

shell> phpize

shell> ./configure

shell> make

shell> make install

Then,

Create file /etc/php/conf.d/imagick.ini and add a line "extension=imagick.so"

Reload Apache: sudo /etc/init.d/apache2 reload

For some reason,pecl never worked.but a combination of the links "http://www.gerd-riesselmann.net/development/how-install-imagick-and-gmagick-ubuntu" and the tutorial " helped me.

Sydney answered 11/8, 2011 at 18:57 Comment(0)
B
1
apt-get install php-pear
pecl install gmagick-1.1.7RC3
apt-get install libevent-dev
apt-get install libgraphicsmagick1-dev

nano /etc/php5/mods-available/gmagick.ini // Add "extension=gmagick.so"
cd /etc/php5/cli/conf.d/    
ln -s ../../mods-available/gmagick.ini 20-gmagick.ini

php5enmod gmagick
service nginx restart
service php5-fpm restart 
Brainwashing answered 18/2, 2017 at 14:4 Comment(0)
B
0

I never liked "PECL", but seems is the only way to get that gmagick added to my [email protected] being Mac zealoth.

After running pecl install gmagick the output in the console will be similar to:

Failed to download pecl/gmagick within preferred state "stable", latest release is version 2.0.5RC1, stability "beta", use "channel://pecl.php.net/gmagick-2.0.5RC1" to install

The content of the page and the page URL points to "Release 2.0.5RC1", so the command becomes:

pecl install gmagick-2.0.5RC1

That "PECL" thing installs extensions to a pecific directory, which PHP scans

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
extension_dir = "/usr/local/lib/php/pecl/20180731"
Brainwashing answered 24/6, 2019 at 19:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.