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.
Posts: 8194
Try putting Gallery into config mode, and then run the check_imagemagick.php script in the setup/ directory. Report the results...
Posts: 6
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.
Posts: 7
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)!
Posts: 6
I just switched to NetPBM and moved on.
Posts: 7
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?
Posts: 13451
Did you enable debug mode? If so provide us with the errors that gives?
Posts: 7
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.
Posts: 8194
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.
Posts: 7
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)
Posts: 7
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
Posts: 8194
Use ImageMagick then ;) Put Gallery back into config mode, and specify ImageMagick as your choice, instead of NetPBM.
Posts: 7
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)!
Posts: 8194
Hmmm. What version of Gallery are you using? Can you make sure you're using at least 1.3.4?
Posts: 7
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.
Posts: 5
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.
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.
Posts: 5
Dreamhost got back to me and it does support it. So anyone know what I'm doing wrong?
Posts: 8194
No, your host disabled a vital function that Gallery needs, exec(). You must ask your host to re-enable this function...
Posts: 5
Oh hmm my host told me that everything was fine. I'll do that right now. Thanks!
Posts: 4
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??????
Posts: 8194
Atlantis95: If you're having the exact same error (exec() related), read my first post.
Posts: 3473
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.
Posts: 4
Sorry, it is PHP version 4.1.2
Posts: 8194
Read my post
Posts: 4
It is not the exec( ) related.
I am getting:
Posts: 8194
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")
Posts: 5
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.
I can't delete or create new albums now. Is that another host problem? *sigh*
Posts: 8194
That's a permissions problem. Run Bharat's Cleanup Script (User Guide under Scripts) on your albums directory. That should help...
Posts: 5
Ahhhhhhhhh it's finally working! THANK YOU SO MUCH! I was about to give up all together! Thank you!!!!!
Posts: 8194
No problem