Install hangs when installing ImageMagick

mrruben5

Joined: 2010-11-01
Posts: 7
Posted: Mon, 2010-11-01 23:30

Hey there, I'm trying to install G2 with imagemagick onto my desktop. I'm running apache2 + php5 + mysql5. When trying to install ImageMagick/Graphicsmagick, the script hangs (the XMLHttpRequest takes literally forever). I installed my server using macports, and am wondering what the cause is off this issue.

So I'm thinking this has something to do with the ImageMagick or GraphicsMagick lib, and nothing to do with the rest, so I will list the installed ports.
GraphicsMagick Version:1.3.12_1+q8
ImageMagick Version:6.6.5-0_0+q16
php5-gmagick Version:1.0.7b1_0
php5-imagick Version:3.0.0_0

phpinfo about these:

imagick module version
	3.0.0
imagick classes
	Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator
ImageMagick version 
	ImageMagick 6.6.5-0 2010-11-01 Q16 http://www.imagemagick.org
ImageMagick copyright
	Copyright (C) 1999-2010 ImageMagick Studio LLC
ImageMagick release date
	2010-11-01
ImageMagick number of supported formats:
	194
ImageMagick supported formats
	3FR, A, AI, ART, ARW, AVI, AVS, B, BGR, BGRA, BMP, BMP2, BMP3, BRF, C, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, FAX, FITS, FRACTAL, FTS, G, G3, GIF, GIF87, GRADIENT, GRAY, GROUP4, HALD, HISTOGRAM, HRZ, HTM, HTML, ICB, ICO, ICON, INFO, INLINE, IPL, ISOBRL, JNG, JPEG, JPG, K, K25, KDC, LABEL, M, M2V, M4V, MAP, MAT, MATTE, MIFF, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NULL, O, ORF, OTB, OTF, PAL, PALM, PAM, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG24, PNG32, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, R, RADIAL-GRADIENT, RAF, RAS, RGB, RGBA, RGBO, RLA, RLE, SCR, SCT, SFW, SGI, SHTML, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UIL, UYVY, VDA, VICAR, VID, VIFF, VST, WBMP, WMV, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, Y, YCbCr, YCbCrA, YUV

imagick.locale_fix	0	0
imagick.progress_monitor	0	0
gmagick version
	1.0.6b1
GraphicsMagick version
	GraphicsMagick 1.3.12 2010-03-08 Q8 http://www.GraphicsMagick.org/ 

Config:

System info:
Gallery URL = http://mreintjes.local/gallery2/main.php
Gallery versie = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Thema 2.6, Embed 1.5
PHP versie = 5.3.3 apache2handler
Web server = Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/1.0.0a DAV/2 PHP/5.3.3
Database = mysqli 5.1.51-log, lock.system=flock
Toolkits =
Versnelling = none/21600, none/21600
Besturingssysteem = Darwin iMacRuben.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
Standaard thema = matrix
gettext = geactiveerd
Talen = nl_NL
Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; nl; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Rijen in GalleryAccessMap tabel = 6
Rijen in GalleryAccessSubscriberMap tabel = 1
Rijen in GalleryUser tabel = 2
Rijen in GalleryItem tabel = 1
Rijen in GalleryAlbumItem tabel = 1
Rijen in GalleryCacheMap tabel = 0 
 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2010-11-02 00:38

Gallery2 does not use the php extensions at all.

You need the path to the binaries themselves.
http://codex.gallery2.org/Installing_an_Image_Processing_Library
and more specifically the instructions for netpbm are the same http://codex.gallery2.org/Installing_an_Image_Processing_Library#NetPBM

Quote:
# Chmod the directory, and every file inside the directory 0755 (in graphical FTP clients, this is Owner -> Read, Write, Execute; Group -> Read, Execute; Other -> Read, Execute) It is very important that you chmod both the directory and every file inside

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
mrruben5

Joined: 2010-11-01
Posts: 7
Posted: Tue, 2010-11-02 00:48

To make myself more clear, I can not install any of the graphics toolkits(the installer hangs). So I also can not configure them to point to an absolute path on my system.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2010-11-02 02:37

gallery tries to autodetect your binaries. so maybe its hanging in the test.
check your apache error.log

FAQ: How to set/use Gallery in debug mode?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
mrruben5

Joined: 2010-11-01
Posts: 7
Posted: Tue, 2010-11-02 13:41

I attached a debug log to this post. Seems to me it sees ImageMagick correctly, but GraphicsMagick is stuck at testing PNG support. Or something like that, I'm not sure.

EDIT: checked if I could run the command from terminal:

iMacRuben:~ rubenvincenten$ /usr/local/bin/identify  /Users/rubenvincenten/Sites/mreintjes.local/www/gallery2/modules/imagemagick/data/test.png
identify: memory allocation failed `/Users/rubenvincenten/Sites/mreintjes.local/www/gallery2/modules/imagemagick/data/test.png' @ error/png.c/ReadOnePNGImage/1781.
identify: corrupt image `/Users/rubenvincenten/Sites/mreintjes.local/www/gallery2/modules/imagemagick/data/test.png' @ error/png.c/ReadPNGImage/3101.

But when copying/moving the test.png to my home dir:

iMacRuben:~ rubenvincenten$ /opt/local/bin/identify ~/test.png
/Users/rubenvincenten/test.png PNG 50x50 50x50+0+0 8-bit DirectClass 730B 0.000u 0:00.039

I'm kind of confused about it.

Does G2 favor GM over IM?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2010-11-02 13:37

Uninstall graphicsmagick, you only need imagemagick

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
mrruben5

Joined: 2010-11-01
Posts: 7
Posted: Tue, 2010-11-02 14:28

I have uninstalled both GM and IM, and when running identify from terminal, I get exactly the same output:

iMacRuben:~ rubenvincenten$ /usr/local/bin/identify  /Users/rubenvincenten/Sites/mreintjes.local/www/gallery2/modules/imagemagick/data/test.png
identify: memory allocation failed `/Users/rubenvincenten/Sites/mreintjes.local/www/gallery2/modules/imagemagick/data/test.png' @ error/png.c/ReadOnePNGImage/1781.
identify: corrupt image `/Users/rubenvincenten/Sites/mreintjes.local/www/gallery2/modules/imagemagick/data/test.png' @ error/png.c/ReadPNGImage/3101.

I'm thinking my OS X has an IM floating around somewhere else, which G2 seems to pick up:

modules/imagemagick/modules.inc, function autoConfigure:


    } else if (GalleryUtilities::isA($platform, 'UnixPlatform')) {
        foreach (explode(':', getenv('PATH')) as $path) {
        $path = trim($path);
        if (empty($path)) {
            continue;
        }
        if ($path{strlen($path)-1} != $slash) {
            $path .= $slash;
        }
        $paths[] = $path;
        }

        $paths[] = '/usr/bin/';
        $paths[] = '/usr/local/bin/';
        $paths[] = '/bin/';
        $paths[] = '/sw/bin/';
    } else {

Can I add /opt/local/bin/ in front of it you think?

TBH, I think using the IM php classes instead would be better, as you do not have to deal with finding the binaries. My problem is an example of this.

Even better, have the pathfinding of the binaries as a fallback :)

 
mrruben5

Joined: 2010-11-01
Posts: 7
Posted: Tue, 2010-11-02 14:26

Guess what, adding the path /opt/local/bin/ to the module worked for me.