Cannot create thumbnail(0). Not FAQ-solvable

Ronin

Joined: 2003-05-20
Posts: 6
Posted: Tue, 2003-05-20 19:14

Hi all,
I've been struggling for days to setup Gallery 1.3.3 and have got it to a point where I can't add images to an album. I'm running Windows XP Pro, PHP 4.3.1, Apache 2.0.45, ImageMagick 5.5.7-Q16. All the diagnostic tests work without error.

Here's what Gallery spits out in debug mode when I try to add an image (Sunset.jpg):

Processing status...
- Adding Sunset.jpg
Executing:

D:\ImageMagick\convert -quality 95 -size 150x150 "D:\Program Files\Apache Group\Apache2\htdocs\gallery\albums\Temp\Sunset.jpg" -geometry 150x150 +profile "*" "D:\Program Files\Apache Group\Apache2\htdocs\gallery\albums\Temp\Sunset.thumb.jpg"

Results:
none

Error messages:

Status: 1 (expected 0)
Error: Unable to make thumbnail (0)!

-------------------------------------------------
I tried running this function separately from my ImageMagick directory for the same image (Sunset.jpg), and here's what I get:

>> convert -quality 95 -size 150x150 Sunset.jpg -geometry 150x150 +profile * Sunset.thumb.jpg
convert: No decode delegate for this image format (D:\ImageMagick\X11.dll).

Interestingly, if I omit the "+profile *" part from the command, it works perfectly from the command-line. Otherwise, I get the above error along with a bunch of intermediate (?) numbered files named Sunset.thumb.0 etc. Any idea what this "+profile" thing is for anyway??

The Apache error.log has a couple of GALLERY_BASEDIR related warnings (which I presume are ok in Gallery 1.3) in addition to an invalid-image warning. Here's what gets added to the error.log file after I try to add an image to an album

PHP Notice: Undefined variable: GALLERY_BASEDIR in D:\Program Files\Apache Group\Apache2\htdocs\gallery\login.php on line 30
PHP Notice: Undefined variable: GALLERY_BASEDIR in D:\Program Files\Apache Group\Apache2\htdocs\gallery\login.php on line 30
PHP Notice: Undefined variable: GALLERY_BASEDIR in D:\Program Files\Apache Group\Apache2\htdocs\gallery\view_album.php on line 30
PHP Notice: Undefined variable: GALLERY_BASEDIR in D:\Program Files\Apache Group\Apache2\htdocs\gallery\add_photos.php on line 30
PHP Notice: Undefined variable: GALLERY_BASEDIR in D:\Program Files\Apache Group\Apache2\htdocs\gallery\progress_uploading.php on line 30
PHP Notice: Undefined variable: GALLERY_BASEDIR in D:\Program Files\Apache Group\Apache2\htdocs\gallery\save_photos.php on line 30
D:\ImageMagick\convert: Not a JPEG file: starts with 0x0d 0x0a (D:\Program Files\Apache Group\Apache2\htdocs\gallery\AUTHORS).
Application transferred too few scanlines
PHP Notice: Undefined variable: GALLERY_BASEDIR in D:\Program Files\Apache Group\Apache2\htdocs\gallery\view_album.php on line 30
PHP Notice: Undefined variable: GALLERY_BASEDIR in D:\Program Files\Apache Group\Apache2\htdocs\gallery\save_photos.php on line 30

-----------------------------------------------------------------------------------

I apologize if the same problem has already been posted, but I haven't found it after a lot of searching and associated agony. Please help. :cry:

Thanks in advance.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Tue, 2003-05-20 20:47

Try putting Gallery into config mode, and then run the check_imagemagick.php script in the setup/ directory. Report the results...

 
Ronin

Joined: 2003-05-20
Posts: 6
Posted: Tue, 2003-05-20 21:08

Just to be sure, do you mean: Run the configure.bat script, and then run check_imagemagick.php in the setup/ directory through my browser? I did that, and it gives me no errors. It detects my ImageMagick binaries at the correct path (D:/ImageMagick) and reports:

Checking D:\ImageMagick\identify.exe
Ok! Version: can't detect version on Windows

Checking D:\ImageMagick\convert.exe
Ok! Version: can't detect version on Windows

Checking D:\ImageMagick\composite.exe
Ok! Version: can't detect version on Windows

I assume that's ok. Please keep me posted. Thanks.

 
legalguy

Joined: 2003-06-30
Posts: 7
Posted: Mon, 2003-06-30 18:37

I am having exactly the same problem. Any luck resolving the issue? Here is my error message (running on de-bug mode):

Executing:
/usr/bin/convert -quality 95 -size 150x150 /home/uspalmer/public_html/gallery/albums/album28/daschle.jpg -geometry 150x150 +profile "*" /home/uspalmer/public_html/gallery/albums/album28/daschle.thumb.jpg

Results:
none

Error messages:
/usr/bin/convert: Not a JPEG file: starts with 0x0a 0x4d (/home/uspalmer/public_html/gallery/AUTHORS).
Application transferred too few scanlines

Status: 9 (expected 0)
Error: Unable to make thumbnail (0)!

 
Ronin

Joined: 2003-05-20
Posts: 6
Posted: Mon, 2003-06-30 18:57

I just switched to NetPBM and moved on. :)

 
legalguy

Joined: 2003-06-30
Posts: 7
Posted: Mon, 2003-06-30 19:08

I tried switching, but I get a similar response using NetPBM:

Executing:
/home/uspalmer/public_html/gallery/netpbm/jpegtopnm /home/uspalmer/public_html/gallery/albums/album28/smart.jpg | /home/uspalmer/public_html/gallery/netpbm/pnmscale -xysize 150 150 | /home/uspalmer/public_html/gallery/netpbm/ppmtojpeg --quality=95 > /home/uspalmer/public_html/gallery/albums/album28/smart.thumb.jpg

Results:
none

Error messages:
Status: 255 (expected 0)
Error: Unable to make thumbnail (0)!

Apparently, Ronin, you did not have any problems once you switched to NetPBM. Does anybody have any idea what the problem could be?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Mon, 2003-06-30 21:25

Did you enable debug mode? If so provide us with the errors that gives?

 
legalguy

Joined: 2003-06-30
Posts: 7
Posted: Tue, 2003-07-01 02:07

I already enabled debug mode. The above mentioned error messages are all from debug mode. Without debug mode, I only get the following message:

Error: Unable to make thumbnail (0)!

Note also: I have checked and double checked the file paths, and they are all correct. My file path is set to home/uspalmers/public_html/gallery/albums.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Tue, 2003-07-01 02:44

Can you run the check_netpbm.php script in the setup/ directory? That'll give us a clue about what's going on. Gallery will have to be in setup mode.

 
legalguy

Joined: 2003-06-30
Posts: 7
Posted: Tue, 2003-07-01 13:34

When I run the check_netpbm.php script I get the following errors:

Checking /home/uspalmer/public_html/gallery/netpbm/giftopnm
Error! (Expected status: 0, but actually received status: 255)

Checking /home/uspalmer/public_html/gallery/netpbm/jpegtopnm
Error! (Expected status: 0, but actually received status: 255)

Checking /home/uspalmer/public_html/gallery/netpbm/pngtopnm
Error! (Expected status: 0, but actually received status: 255)

Checking /home/uspalmer/public_html/gallery/netpbm/pnmcut
Error! (Expected status: 0, but actually received status: 255)

Checking /home/uspalmer/public_html/gallery/netpbm/pnmfile
Error! (Expected status: 0, but actually received status: 255)

Checking /home/uspalmer/public_html/gallery/netpbm/pnmflip
Error! (Expected status: 0, but actually received status: 255)

Checking /home/uspalmer/public_html/gallery/netpbm/pnmrotate
Error! (Expected status: 0, but actually received status: 255)

Checking /home/uspalmer/public_html/gallery/netpbm/pnmscale
Error! (Expected status: 0, but actually received status: 255)

Checking /home/uspalmer/public_html/gallery/netpbm/pnmtopng
Error! (Expected status: 0, but actually received status: 255)

Checking /home/uspalmer/public_html/gallery/netpbm/ppmquant
Error! (Expected status: 0, but actually received status: 255)

Checking /home/uspalmer/public_html/gallery/netpbm/ppmtogif
Error! (Expected status: 0, but actually received status: 255)

Checking /home/uspalmer/public_html/gallery/netpbm/ppmtojpeg
Error! (Expected status: 0, but actually received status: 255)

 
legalguy

Joined: 2003-06-30
Posts: 7
Posted: Tue, 2003-07-01 13:40

Interestingly, though, when I run the check_imagemagick.php script, I receive no errors at all. Here are my results:

Checking /usr/bin/identify
Ok! Version: ImageMagick 5.5.7 06/03/03 Q16

Checking /usr/bin/convert
Ok! Version: ImageMagick 5.5.7 06/03/03 Q16

Checking /usr/bin/composite
Ok! Version: ImageMagick 5.5.7 06/03/03 Q16

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Tue, 2003-07-01 14:01

Use ImageMagick then ;) Put Gallery back into config mode, and specify ImageMagick as your choice, instead of NetPBM.

 
legalguy

Joined: 2003-06-30
Posts: 7
Posted: Tue, 2003-07-01 14:14

I've tried that. Even though ImageMagick checks out every time I check it (and I've even talked to my server manager who says that everything checks out with ImageMagick), I get the error specified below:

Executing:
/usr/bin/convert -quality 95 -size 150x150 /home/uspalmer/public_html/gallery/albums/album28/daschle.jpg -geometry 150x150 +profile "*" /home/uspalmer/public_html/gallery/albums/album28/daschle.thumb.jpg

Results:
none

Error messages:
/usr/bin/convert: Not a JPEG file: starts with 0x0a 0x4d (/home/uspalmer/public_html/gallery/AUTHORS).
Application transferred too few scanlines

Status: 9 (expected 0)
Error: Unable to make thumbnail (0)!

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Tue, 2003-07-01 14:38

Hmmm. What version of Gallery are you using? Can you make sure you're using at least 1.3.4?

 
legalguy

Joined: 2003-06-30
Posts: 7
Posted: Tue, 2003-07-01 15:24

I was using version 1.3.3. I upgraded, but that still didn't help the problem. Finally, I thought that I would delete and upload the NetPBM binaries again. Well, for whatever reason, it worked. I'm still puzzled as to why ImageMagick would not work (as ImageMagick always check out), but I've got it working with NetPBM, so I'll stick with it.

Thanks.

 
h0neyb

Joined: 2003-07-05
Posts: 5
Posted: Sat, 2003-07-05 18:25

I'm having a similar problem. I checked all over FAQ but didn't find the error that I was getting. Maybe I overlooked it but here's what I'm getting.

Processing status... 
- Adding 04.jpg 
Executing:

/home/.racewayovenheater/h0neyb/drops-of-jupiter.net/uyd/gallery/netpbm/jpegtopnm /home/.racewayovenheater/h0neyb/drops-of-jupiter.net/uyd/gallery/albums/Season-Six/04_G.jpg | /home/.racewayovenheater/h0neyb/drops-of-jupiter.net/uyd/gallery/netpbm/pnmscale -xysize 150 150 | /home/.racewayovenheater/h0neyb/drops-of-jupiter.net/uyd/gallery/netpbm/ppmtojpeg --quality=95 > /home/.racewayovenheater/h0neyb/drops-of-jupiter.net/uyd/gallery/albums/Season-Six/04_G.thumb.jpg

Warning: exec() has been disabled for security reasons in /home/.racewayovenheater/h0neyb/drops-of-jupiter.net/uyd/gallery/platform/fs_unix.php on line 32

Results: 
none

Error messages: 


Status: (expected 0)
Error: Unable to make thumbnail (0)! 

I'm having a feeling that the error is due to my host? Am I not allowed to use this on my server or did I do something wrong?

Everything seems to be fine but adding pictures.

 
h0neyb

Joined: 2003-07-05
Posts: 5
Posted: Sat, 2003-07-05 22:20

Dreamhost got back to me and it does support it. So anyone know what I'm doing wrong?

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sat, 2003-07-05 22:21

No, your host disabled a vital function that Gallery needs, exec(). You must ask your host to re-enable this function...

 
h0neyb

Joined: 2003-07-05
Posts: 5
Posted: Sun, 2003-07-06 02:26

Oh hmm my host told me that everything was fine. I'll do that right now. Thanks!

 
Atlantis95

Joined: 2003-07-06
Posts: 4
Posted: Sun, 2003-07-06 20:43

I have the same problem. I downloaded gallery version 1.3.4 and am using php version 1.4.2, Imagemagick version 5.5.1 .

I will try to het Netbpm installed. But that seams also to give problems (I will do some research on the netbpm issue).

Is it possible that the designer released a version that is still using netbpm, while imagemagick is set??????

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sun, 2003-07-06 21:13

Atlantis95: If you're having the exact same error (exec() related), read my first post.

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Sun, 2003-07-06 21:14
Atlantis95 wrote:
I have the same problem. I downloaded gallery version 1.3.4 and am using php version 1.4.2, Imagemagick version 5.5.1 .

What version of PHP are you using? I don't think it can be 1.4.2, but if it is, then you need to upgrade. Only version greater than 4.0.4 are supported.

 
Atlantis95

Joined: 2003-07-06
Posts: 4
Posted: Sun, 2003-07-06 21:19

Sorry, it is PHP version 4.1.2

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sun, 2003-07-06 21:22

Read my post

 
Atlantis95

Joined: 2003-07-06
Posts: 4
Posted: Sun, 2003-07-06 21:40

It is not the exec( ) related.

I am getting:

Quote:
- Adding IMGP0215.jpg
Executing:

/usr/local/bin/convert -quality 95 -size 150x150 /home/sites/home/web/albums/album_01/IMGP0215.jpg -geometry 150x150 +profile '\*' /home/sites/home/web/albums/album_01/IMGP0215.thumb.jpg

Results:
none

Error messages:
/usr/local/bin/convert: no delegate for this image format (/home/sites/home/web/albums/album_01/IMGP0215.jpg).

Status: 1 (expected 0)
Error: Unable to make thumbnail (0)!

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sun, 2003-07-06 21:51

It looksl ike your ImageMagick installation doesn't have JPEG support. Ask your host to install the JPEG libraries, or use NetPBM (available on the Gallery SF.net download page -- click "Download Now")

 
h0neyb

Joined: 2003-07-05
Posts: 5
Posted: Sun, 2003-07-06 23:12

All right new problem. My host told me to put AddType php-cgi .php in my .htaccess file. Which worked. My binaries are ok now. But now I'm getting a new error.

Processing status... 
- Adding cleansober_00.jpg 
Warning: Unable to create '/home/h0neyb/drops-of-jupiter.net/uyd/gallery/albums/album01/cleansober_00.jpg': Permission denied in /home/.racewayovenheater/h0neyb/drops-of-jupiter.net/uyd/gallery/platform/fs_unix.php on line 24

Warning: getimagesize: Unable to open '/home/h0neyb/drops-of-jupiter.net/uyd/gallery/albums/album01/cleansober_00.jpg' for reading. in /home/.racewayovenheater/h0neyb/drops-of-jupiter.net/uyd/gallery/util.php on line 501

Error: Invalid image: cleansober_00.jpg! 
Need help? Look in the Gallery FAQ 
Warning: unlink() failed (Permission denied) in /home/.racewayovenheater/h0neyb/drops-of-jupiter.net/uyd/gallery/platform/fs_unix.php on line 77

Warning: fopen("/home/h0neyb/drops-of-jupiter.net/uyd/gallery/albums/album01/photos.dat.lock", "a+") - Permission denied in /home/.racewayovenheater/h0neyb/drops-of-jupiter.net/uyd/gallery/platform/fs_unix.php on line 53
Error: Could not open lock file (/home/h0neyb/drops-of-jupiter.net/uyd/gallery/albums/album01/photos.dat.lock)!
Warning: fopen("/home/h0neyb/drops-of-jupiter.net/uyd/gallery/albums/album01/album.dat.lock", "a+") - Permission denied in /home/.racewayovenheater/h0neyb/drops-of-jupiter.net/uyd/gallery/platform/fs_unix.php on line 53
Error: Could not open lock file (/home/h0neyb/drops-of-jupiter.net/uyd/gallery/albums/album01/album.dat.lock)!
Warning: fopen("/home/h0neyb/drops-of-jupiter.net/uyd/gallery/albums/album01/serial.21.dat", "w") - Permission denied in /home/.racewayovenheater/h0neyb/drops-of-jupiter.net/uyd/gallery/platform/fs_unix.php on line 53

Warning: fopen("/home/h0neyb/drops-of-jupiter.net/uyd/gallery/albums/serial.dat", "w") - Permission denied in /home/.racewayovenheater/h0neyb/drops-of-jupiter.net/uyd/gallery/platform/fs_unix.php on line 53

I can't delete or create new albums now. Is that another host problem? *sigh*

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sun, 2003-07-06 23:20

That's a permissions problem. Run Bharat's Cleanup Script (User Guide under Scripts) on your albums directory. That should help...

 
h0neyb

Joined: 2003-07-05
Posts: 5
Posted: Mon, 2003-07-07 00:59

Ahhhhhhhhh it's finally working! THANK YOU SO MUCH! I was about to give up all together! Thank you!!!!!

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Mon, 2003-07-07 02:06

No problem :)