ImageMagick 6.7.4-2 Installed But Not Executing in Gallery

rsokhi

Joined: 2010-01-03
Posts: 15
Posted: Mon, 2011-12-26 03:09

I'm trying to get ImageMagick binaries to work with G2 but can't seem to figure it out. I installed the most recent binaries (ImageMagick 6.7.4-2) with root access (painful, but figured it out) but I'm not able to point the G2 toolkit to the right path. Not sure how to determine where that path is. I know I unpacked the tar to the following directory: /usr/local/src/. When I point to it in G2, I get a "The path you entered is not a valid directory or is not accessible" error.

Note that I'm on a 1and1 VPS and my site is actually at var/www/vhosts...etc, etc. I know /usr/local/src/ is not accessible without root access, but I unpacked the tar there to install the binaries per instructions I found here and here. However, these are just the installation files...where are the binaries installed to?

Another thing to note, I know ImageMagick installed successfully as when I run "identify -version", the following returns:

Quote:
Version: ImageMagick 6.7.4-2 2011-12-25 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

Another note: I've installed ImageMagick before on a similar system before and got it to work. The path to the binaries that worked in G2 was /var/www/vhosts/DOMAINNAME.com/httpdocs/ImageMagick-6.7.0.9/bin/ (accessible through regular http access). I have no idea how I got the identify, convert and composite binaries into that folder.

Entering

Quote:
locate identify

in shell, I get the following results:

Quote:
/usr/local/src/ImageMagick-6.7.4-2/magick/identify.c
/usr/local/src/ImageMagick-6.7.4-2/magick/identify.h
/usr/local/src/ImageMagick-6.7.4-2/tests/validate-identify.sh
/usr/local/src/ImageMagick-6.7.4-2/utilities/identify.1
/usr/local/src/ImageMagick-6.7.4-2/utilities/identify.1.in
/usr/local/src/ImageMagick-6.7.4-2/utilities/identify.c
/usr/local/src/ImageMagick-6.7.4-2/wand/identify.c
/usr/local/src/ImageMagick-6.7.4-2/wand/identify.h
/usr/local/src/ImageMagick-6.7.4-2/www/identify.html
/usr/local/src/ImageMagick-6.7.4-2/www/api/MagickCore/identify_8c.html
/usr/local/src/ImageMagick-6.7.4-2/www/api/MagickCore/identify_8h-source.html
/usr/local/src/ImageMagick-6.7.4-2/www/api/MagickCore/identify_8h.html
/usr/local/src/ImageMagick-6.7.4-2/www/api/MagickWand/identify_8c.html
/usr/local/src/ImageMagick-6.7.4-2/www/api/MagickWand/identify_8h-source.html
/usr/local/src/ImageMagick-6.7.4-2/www/api/MagickWand/identify_8h.html

Pointing to these directories does nothing: directory does not exist or not accessible.

Any ideas?

 
rsokhi

Joined: 2010-01-03
Posts: 15
Posted: Mon, 2011-12-26 03:11

System info as follows:

Quote:
Gallery URL = http://cmnycakes.com/gallery2/main.php
Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.3.3 apache2handler
Webserver = Apache
Database = mysqli 5.0.77, lock.system=flock
Toolkits = LinkItemToolkit, Exif, ArchiveUpload, Thumbnail, ImageMagick, SquareThumb
Acceleration = none/604800, none/604800
Operating system = Linux s15438256.onlinehome-server.com 2.6.18-028stab094.3 #1 SMP Thu Sep 22 12:47:37 MSD 2011 x86_64
Default theme = ice_rsokhi
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
Rows in GalleryAccessMap table = 61
Rows in GalleryAccessSubscriberMap table = 1094
Rows in GalleryUser table = 129
Rows in GalleryItem table = 1087
Rows in GalleryAlbumItem table = 9
Rows in GalleryCacheMap table = 0

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2011-12-26 03:37

instead of "locate identify" try "which identify"
and they usually install to /usr/bin or /usr/local/bin

the binaries need to be 755

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

 
rsokhi

Joined: 2010-01-03
Posts: 15
Posted: Mon, 2011-12-26 03:55

Yes! It was /usr/local/bin. The thing is I still get a "The path you entered is not a valid directory or is not accessible." error after chmod to 755. What am I doing wrong? Note that G2 adds a forward slash at the end (/usr/local/bin/). Is this a problem?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2011-12-26 03:58
 
rsokhi

Joined: 2010-01-03
Posts: 15
Posted: Mon, 2012-01-02 12:21

suprsidr you magnificent bastard! It worked!!

Initially, I was having some problems getting your instructions to work from the following forum post. So I thought I would let people know what I did.

Turns out the instructions are for gallery3. What I did was (with root access) create a vhost.conf file in the /var/www/vhosts/cmnycakes.com/conf directory, and added the following text (note that it needs to have main.php as obviously G2 uses that file, rather than index.php):

Quote:
<Directory /var/www/vhosts/cmnycakes.com/httpdocs>
DirectoryIndex at_domains_index.html index.php index.html index.htm main.php
php_admin_value open_basedir none
</Directory>

Restarted apache with /etc/init.d/httpd restart

And voila...imagemagick tests pass in G2!