gallery, imagemagick and non-root access

chaos421
chaos421's picture

Joined: 2003-09-29
Posts: 44
Posted: Thu, 2004-09-30 22:13

hey all. i am attempting to install gallery in a personal web space on a server where i don't have root access.

Gallery v1.4.4-pl2
SunOS garnet.tc.umn.edu 5.9 Generic_117171-07 sun4u sparc SUNW,Sun-Fire-V240

i have finally installed imagemagick into my homedir (~/bin and ~/lib)

i told gallery about them, and when i run setup/check_imagemagick.php it says:

/home/m/murp0345/bin/identify does not exist
/home/m/murp0345/bin/convert does not exist

however, they are there... and they work.

> ls -la identify convert
-rwxr-xr-x 1 murp0345 people 11440504 Sep 30 15:43 convert
-rwxr-xr-x 1 murp0345 people 11374572 Sep 30 15:43 identify
> pwd
/home/m/murp0345/bin
> convert
Version: ImageMagick 6.0.8 09/30/04 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2004 ImageMagick Studio LLC
<snip>

any help?

thanks,
keith

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3473
Posted: Fri, 2004-10-01 00:24

In order for /home/m/murp0345/bin/foobar to be visible and executable by anybody, the following must be true:

1. foobar has at least 555 permissions (-r-xr-xr-x) cool.... yours do
2. /home/m/murp0345/bin must have at least 555 permissions (dr-xr-xr-x)
3. /home/m/murp0345 must have at least 555 permissions (dr-xr-xr-x)
4. /home/m ... same deal
5. /home ... same deal

So... my guess is your home directory (murp0345) has 700 (drwx------) permissions... change it to 755 and you should be all set.

-Beckett (

)

 
chaos421
chaos421's picture

Joined: 2003-09-29
Posts: 44
Posted: Fri, 2004-10-01 01:16

great, now the imagemagick is detected... however when i try to upload a picture... it seems to get the picture up there... it's in the directory (ssh verified)... but the web browser hangs. i turned debug mode on, but no debug messages came up.

any thoughts?

thanks,
keith

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3473
Posted: Fri, 2004-10-01 04:16

The picture's in which directory? Is it showing up in Gallery with resized thumbnails?
Debug mode prints out the imagemagick command to actually process the images. Try running those in the shell directly to see if it works as expected. Also... what does the web page gallery/setup/check_imagemagick.php say now?

At this point, exact error/success messages would be helpful. You're almost there! :)
-Beckett (

)

 
chaos421
chaos421's picture

Joined: 2003-09-29
Posts: 44
Posted: Fri, 2004-10-01 12:48

check_imagemagick.php has no errors, same as before.

> pwd
/www/m/murp0345/web-docs/albums/album01
> ls -l
total 2184
-rw-rw-r-- 1 www www 201727 Sep 30 19:45 IMG_0198.jpg
-rw-rw-r-- 1 www www 65658 Sep 30 19:57 IMG_0205.jpg
-rw-rw-r-- 1 www www 240245 Sep 30 19:59 IMG_0205_001.jpg
-rw-rw-r-- 1 www www 240245 Sep 30 20:08 IMG_0205_002.jpg
-rw-rw-r-- 1 www www 68554 Sep 30 20:14 IMG_0205_003.jpg
-rw-rw-r-- 1 www www 240245 Sep 30 20:17 IMG_0205_004.jpg
-rw-r--r-- 1 www www 2648 Sep 30 20:17 album.dat
-rw-r--r-- 1 www www 2648 Sep 30 20:17 album.dat.bak
-rw-r--r-- 1 www www 0 Sep 30 19:41 album.dat.lock
-rw-r--r-- 1 www www 2 Sep 30 20:17 photos.dat
-rw-r--r-- 1 www www 2 Sep 30 20:17 photos.dat.bak
-rw-r--r-- 1 www www 0 Sep 30 19:41 photos.dat.lock
>

it gets about this far in the popup window:
Processing status...

- Adding IMG_0205.jpg
   Resizing/compressing original image

and in the main window, it's trying to reload the page. which eventually doesn't load. however, i quit the browser and load that same page again, it loads fine... except that picture doesn't show up.

Safari could not open the page “http://www.tc.umn.edu/~murp0345/gallery/view_album.php?set_albumName=album01

 
chaos421
chaos421's picture

Joined: 2003-09-29
Posts: 44
Posted: Fri, 2004-10-01 19:47

just tried it with the applet version... i had to cancel during server processing...

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3473
Posted: Fri, 2004-10-01 22:28

Hm. Okay so the original image is getting into the directory, but then it's hanging.

Can you run the command in your browser?
Something like (substituting in your own path to the convert binary):

$ /usr/local/bin/convert -quality 85 -size 200x200 +profile '*' /www/m/murp0345/web-docs/albums/album01/IMG_0198.jpg -geometry 200x200 /tmp/myconvertedtestthumb.jpg

What output will it give? Does the thumbnail-sized photo get generated?

-Beckett (

)

 
chaos421
chaos421's picture

Joined: 2003-09-29
Posts: 44
Posted: Fri, 2004-10-01 22:36

i ran the following command

~/bin/convert -quality 85 -size 200x200 +profile '*' ~/web-docs//albums/album01/aaa.jpg -geometry 200x200 ./test_t.jpg

with no output... screen, or file. how long should it take?

my imagemagick is located in ~/bin and ~/lib is there a possible problem that it cannot find the lib? if i just type in ~/bin/convert i get output...

thanks again,
keith

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3473
Posted: Fri, 2004-10-01 23:37

Well if there's no output file, then sounds like your imagemagick is b0rked.

/* ImageMagick
 *   convert.c
 */

#define TEE_HEE_HEE 1

int main(int argc, char **argv) {
    while(TEE_HEE_HEE);
    return EXIT_SUCCESS;
}

:) No... in all seriousness. Did you compile ImageMagick yourself? Maybe use NetPBM (we have prebuilt binaries available on the DL page...)

-Beckett (

)

 
chaos421
chaos421's picture

Joined: 2003-09-29
Posts: 44
Posted: Sat, 2004-10-02 02:47

i did compile imagemagick.

http://studio.imagemagick.org/magick/viewtopic.php?p=8236#8236

if you know where i can get precompiled binaries (not a package that needs to be installed) i'll gladly use it. it has to live in my home directory.

> uname -a
SunOS garnet.tc.umn.edu 5.9 Generic_117171-07 sun4u sparc SUNW,Sun-Fire-V240
>

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3473
Posted: Sat, 2004-10-02 03:53

We have solaris NetPBM binaries precompiled on our download page.
Why not just use them.

I can compile ImageMagick on solaris for you, but I'm heading away for the weekend, so it'd be a couple of days. Yeah... just use NetPBM!

-Beckett (

)

 
chaos421
chaos421's picture

Joined: 2003-09-29
Posts: 44
Posted: Sat, 2004-10-02 15:25

ahh, those netpbm deals worked! what a pain in my a$$ this has been... thanks so much for your help beckett

here's where my gallery lives:
http://umn.edu/~murp0345/gallery/

thanks again,
keith

 
beckett
beckett's picture

Joined: 2002-08-16
Posts: 3473
Posted: Sun, 2004-10-03 00:55

Coolness!
Yes... getting NetPBM or ImageMagick going is never easy. Good thing we're reimplementing optional GD support, which ships with newer versions of PHP pre-installed.

-Beckett (

)

 
chaos421
chaos421's picture

Joined: 2003-09-29
Posts: 44
Posted: Sun, 2004-10-03 17:22

very cool...

thanks again for your help,
keith