Thumbnails and resizes not showing up. NetPBM Problem?

gragland

Joined: 2005-03-07
Posts: 35
Posted: Mon, 2005-03-07 07:35

delete

 
StilgarBF

Joined: 2003-09-08
Posts: 27
Posted: Mon, 2005-03-07 13:40

Same Problem and I my webhost is 1und1 to.

All resized Thumbnails from my imported Gallery 1 were broken.
To solve the Problem I activated only NetPBM, then edited every proken Thumbnail (reset to default)
Still it is not possible to use resized Thumbnails. If I resize one, I get the "broken Thumbnail"-symbol.

1und1 has no suport für Imagemagick was then only tool that was working.

and - - sorry fpr my english :-)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-03-07 16:49

turn on buffered debug output in config.php and upload a new image.. look for "Executing" in the debug output and you'll find where it runs the netpbm commands. see if it has any error messages and post them here.

 
gragland

Joined: 2005-03-07
Posts: 35
Posted: Tue, 2005-03-08 00:23

I deleted my gallery2 install and installed the latest cvs version. I uploaded 6 pictures with gallery remote (resizes set to 600x600, 800x800, 1024x1024). This time all the thumbnails showed up, and all the correct resize demensions were in the size select menu, but non of the resized pictures showed up when i selected them.

So then I deleted the pictures and turned on buffered debug in config.php and uploaded the 6 pictures again. The word "executing" was nowhere in the debug output. And this time none of the thumbnails showed up (all broken icons) and the size select options were 92x92, 92x92, 92x92, 2272x1704. I tried the upload applet and the "from web browser" option. Same results and still no sign of the word "executing in the debug output.

I'm PM'ing you my gallery2 login info, i would really appreciate it if you could take a look and try to see what might be wrong. Thanks!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-03-08 01:00

that's because it isn't using NetPBM.. your highest priority toolkit is Gd.. you'll find GdTookit::performOperation in your debug output instead of Executing.
so, it seems Gd isn't working well for you.. i suggest you make NetPBM higher priority in site admin / toolkit priority.

 
gragland

Joined: 2005-03-07
Posts: 35
Posted: Tue, 2005-03-08 02:24

NetPBM was set as "up" and GD was set as "down" in toolkit priority. Any other ideas? If you wanna take a look yourself i pm'ed you the login info.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-03-08 03:09

up and down are links to move the items (try clicking them).. the one listed first is the highest priority.

 
gragland

Joined: 2005-03-07
Posts: 35
Posted: Tue, 2005-03-08 06:50

I set netpbm as high priority now and now half of the images have broken thumbnail icons (the resizes are fine though). I can't check the debug output because the upload applet no longer works for me for some reason. It just hangs, and doesnt load, even after reuploading /modules/uploadapplet/. When I try to load the applet the status bar says "exception: java.security.AccessControlException. access denied (Java.utilpropertypermission com.apple.mrj.application.apple.menu.about.name write)." The certificate accept/deny popup that used to popup when the applett worked no longer pops up.

Whenever i upload using the website uploader that can only upload 4 at a time I dont get broken icons, so i obviously can't check for errors in the debug output. I really appreciate your help!

 
gragland

Joined: 2005-03-07
Posts: 35
Posted: Tue, 2005-03-08 08:35

Ok, i reinstalled netpbm and now all the thumbnails are showing up correctly. Only problem is that when i try to rotate an image i get a broken thumbnail. I think this is the part of the code where the problem is:

file_exists(/homepages/3/d120742016/htdocs/gallery2/g2data/cache/module/netpbm/0/0/0.inc)
tempnam(/homepages/3/d120742016/htdocs/gallery2/g2data/tmp/, npbm_)
Executing: ( "/homepages/3/d120742016/htdocs/gallery2/bin/netpbm/jpegtopnm"
"--quiet"
"/homepages/3/d120742016/htdocs/gallery2/g2data/albums/sand_dunes/IMG_2678.JPG"
| "/homepages/3/d120742016/htdocs/gallery2/bin/netpbm/pnmflip" "-ccw" |
"/homepages/3/d120742016/htdocs/gallery2/bin/netpbm/pnmtojpeg"
"--quality=90" >
"/homepages/3/d120742016/htdocs/gallery2/g2data/tmp/npbm_sKQdJq" )
2>/homepages/3/d120742016/htdocs/gallery2/g2data/tmp/g2dbgaGpRrL
file_exists(/homepages/3/d120742016/htdocs/gallery2/g2data/tmp/g2dbgaGpRrL)
filesize(/homepages/3/d120742016/htdocs/gallery2/g2data/tmp/g2dbgaGpRrL)
fopen(/homepages/3/d120742016/htdocs/gallery2/g2data/tmp/g2dbgaGpRrL, r, 0)
feof(Resource id #150)
fgets(Resource id #150, 4096)
feof(Resource id #150)
fgets(Resource id #150, 4096)
feof(Resource id #150)
fgets(Resource id #150, 4096)
feof(Resource id #150)
fgets(Resource id #150, 4096)
feof(Resource id #150)
fgets(Resource id #150, 4096)
feof(Resource id #150)
fclose(Resource id #150)
unlink(/homepages/3/d120742016/htdocs/gallery2/g2data/tmp/g2dbgaGpRrL)
Regular Output:
Error Output:
pnmflip: Out of memory allocating space for a tuple row of
1704 tuples by 3 samples per tuple by 4 bytes per sample.
jpegtopnm: Error writing single byte sample to file
pnmtojpeg: Error reading magic number from Netpbm image stream. Most
often, this means your input file is empty.
Status: 1 (expected 0)
unlink(/homepages/3/d120742016/htdocs/gallery2/g2data/tmp/npbm_sKQdJq)
copy(/homepages/3/d120742016/htdocs/gallery2/modules/core/classes/../data/broken-image.gif,
/homepages/3/d120742016/htdocs/gallery2/g2data/cache/derivative/1/0/1030.dat)
filesize(/homepages/3/d120742016/htdocs/gallery2/g2data/cache/derivative/1/0/1030.dat)

Just to let you know I don't have access to my php.ini file so if i need to increase the memory_limit i don't know how i am gonna do that. Can I just make a new php.ini file in the galler2 folder? If so, what code do i need to put in it? Thanks!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-03-08 08:48

what's the current memory limit? see http://gaberagland.com/gallery2/install/ step system check. or http://gaberagland.com/gallery2/lib/tools/phpinfo.php -> memory limit.

on the first sight, it looks like your memory limit is too low

Quote:
Error Output:
pnmflip: Out of memory allocating space for...

if you don't have access to the php.ini, try this (this may result in an error message, if so, undo the change).

open the .htaccess file in the gallery2 folder. if no .htaccess file exists, create one.
paste php_value memory_limit 16M into the .htaccess.
Now go to the phpinfo.php or to the installer step system check again and take a look if a) if you get a server error (500) or if the memory is changed. if you get a server error, don't panic. just delete the php_value memory_limit line again.

 
gragland

Joined: 2005-03-07
Posts: 35
Posted: Tue, 2005-03-08 09:29

According to my phpinfo.php the memory limit is 40M. Is it possible thats not enough? Otherwise, any ideas of what could be wrong?

 
gragland

Joined: 2005-03-07
Posts: 35
Posted: Tue, 2005-03-08 09:46

And I just opened my gallery2 again in safari and the thumbnail of the image i tried to rotate had the broken icon so i went to edit>restore original photo, but the icon is still broken. The weird thing is that "restore original photo" had worked the 10 previous times I tried it. Ok, so i rebuilt all the icons for the album, and now almost all the icons are broken! I think i might just go back to Gallery 1 untill G2 is less buggy. I don't know if this is just a problem with 1and1 (as it seems like a lot of other 1and1 users are having probs) but I am tired of trying to get this working.

EDIT: I rebuilt icons/resizes again and this time there were only a couple broken icons. So I rebuilt them again and this time there were no broken icons, but when i clicked a thumbnail i got a php error (something about a resource fork.. i didn't write it down). I kept getting this error when I would click a thumbnail. Ok, so i rebuilt the thumbnails/resizes yet again and this time everything is good. Besides the fact I can't rotate images without losing getting a broken thumbnail.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-03-08 10:03

the memory limit is high enough, good.
G2 isn't buggy, it isn't robust enough to work in bad environments, not yet. That's why it's still beta.
Maybe mindless can help you with these fork issues.

 
gragland

Joined: 2005-03-07
Posts: 35
Posted: Tue, 2005-03-08 10:13

It just doesnt seem to make sense that it takes 2 thumbnail/resize rebuilds to finally get all the icons to show up and for everything to work, and then for some reason there is a php error when I click on the thumbnails, and then after another rebuild everything is normal. It makes me think that it has to be some problem with my host, or a php setting that messing with gallery's operation. Anyway, thanks for the help.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2005-03-08 10:23

I've seen this problem with 1and1 before. Their servers run under a heavy load which leads to exec() calls running out of resources. Basically, G2 can't reliably execute sub-processes in that environment.

I think that we may want to introduce an exec retry. If we see a failure like this, we wait a couple of seconds and try again and see if it works the second time around. This may give us more robust behaviour on flaky/overloaded hosts.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-03-08 10:54

we could model this case :)
p := probability of failure in an overloaded environment. i.e. p = 0.5 for 1and1 :)
P_success = (1-p) + p*(1-p) + p^2*(1-p) + ... + p^(n-1)*(1-p) = probability of successful operation with n retries.
P_success = (1-p) * (p^n - 1)/(p - 1) = 1 - p^n

But p is not constant over time. We'd have to assume a worst case scenario and define a maximum value for n.

 
StilgarBF

Joined: 2003-09-08
Posts: 27
Posted: Tue, 2005-03-08 12:00

I still have that Problem.
When I try to resize a Thumbnail in landscape format I get the broken thumbnail.
When I resize it in portrait I sometimes get a thumbnail with one dimension wrong(hight OR width of 10 or so)
I can fix the broken Thumbnail by using "Reset do default" - but that gives me no resized Thumbnails.
The resizing works fine in my Gallery 1.4.4 (same server, same pictures)
Changing GD or NeBPM to higher priority makes no difference. (btw changing priority only works in IE (at my PC) when I click GD (f.e.) hoch/up or runter/down in Firefox 1.0 it go's up/down for a moment and imediately back to what it was before)
In my Gallery2-testPage I have 2 pictures that show the Problem.
Test 1 with a Portrait-thumbnail with wrong dimensions
Test 1 with a landscape-thumbnail - broken-thumbnail

http://www.projekt2k.de/private/gallery2/main.php

 
gragland

Joined: 2005-03-07
Posts: 35
Posted: Tue, 2005-03-08 18:13
bharat wrote:
I've seen this problem with 1and1 before. Their servers run under a heavy load which leads to exec() calls running out of resources. Basically, G2 can't reliably execute sub-processes in that environment.

I think that we may want to introduce an exec retry. If we see a failure like this, we wait a couple of seconds and try again and see if it works the second time around. This may give us more robust behaviour on flaky/overloaded hosts.

Would you recommend switching hosts? I'm still within 90 days of when i signed up so i can get my money back. Could you reccomend me a better host that isn't too expensive? Thanks!

EDIT:
Here are two hosts that look pretty good. What do you think?
http://www.u2-web.com/u2advanced.php (can't tell if this supports php)
http://www.hostgator.com/shared.shtml

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-03-08 18:30
 
gragland

Joined: 2005-03-07
Posts: 35
Posted: Tue, 2005-03-08 19:18

Thanks, do you have any experience with RJCUK Hosting. It seems to good to be true. Couldn't really find much about it in the forums.
http://www.rjcuk-hosting.co.uk/_sgg/m1_1.htm

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-03-08 19:42

this is rather offtopic. please discuss this in the other subforum.
just a short sidenote: if a hosting offer seems to be good to be true, ask people that are more than 1-2 years hosting a website on this host what they think, if the performance is ok. most times, if a offer is too good to be true, you have all the features, but no performance = not good for G2.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2005-03-08 19:54

All the hosts that we refer are good. Lately I've heard very good things about PowWeb...