hi
I've got a problem with the thumbnail display on my website. When I upload pics, thumbnails are created correctly (i checked the folder where they are stored) and when I reload the page, they are shown correctly. But then, if I hit reload a second time, they are not displayed anymore (only the filenames are shown).
Could someone give me a tip, on what is happening.
thanks a lot
roman
----
Gallery URL (optional): http://schneiderweisse.sc.funpic.de/gallery2/main.php
Gallery version: 2.0-beta-3+
Webserver (with version): Apache ? (FreeBSD)
Datatabase (with version): MySQL 4.0.24
PHP version (eg 4.2.1): PHP 4.3.11
phpinfo URL (optional): http://phpinfo.sc.funpic.de/
Graphics Toolkit(s): GD 2.0.28 (bundled)
Operating system: Windows XP Prof.
Web browser/version: Firefox 1.04
G1 version (for migration bugs): -
Posts: 32509
1. g2 should work with eAccelerator, but as you have a problem, we should eliminate as many variables as possible. so please disable eAccelerator for now and restart the webserver.
2. if this doesn't solve it, i guess it's a permissions problem.
the first time you access a thumbnail / resize, G2 generates the image and serves it directly to you. at the same time it stores the image in g2data/cache/derivatives/...
the seond time you view the image, it loads the image from g2data/cache/derivatives/...
so probably, it failed to store the file on the disk for some reason.
a few days ago, someone else had the same issue. i guess it was a weird windows file permission issue. or safe mode on.
but you are on *nix and safe mode is off.
could you please activate the immediate debug mode in config.php and then add a new photo to your G2. then browse to the thumb and again etc. maybe you see something in the output that explains the behavior. i'd look for filesystem interactions.
Posts: 6
thanks for the fast reply,
ad 1) as I don't have access to the apache server, I won't be able to do as described ... sorry.
ad 2) first of all, my folder is named /derivative/ (without "s"). But I don't think that matters. I've enabled debug mode and uploaded a new image. a lot of output, but nothing referring to I/O problems. Furthermore, one "dat" and two "inc" files are created correctly under /derivative/0/3/ (as well as the jpg file in the album folder) so to me it seems, that everything is allright here.
roman
Posts: 32509
please leave immediate debug mode on such that we can visit the page and see the problem for ourselves. thanks.
Posts: 16504
Could he possibly be running into a problem because his max_execution_time is set to 10 seconds? That's set to 30 seconds on my host's web servers which prevents me from running some stuff, like the unit tests.
Posts: 8
I have this same problem. I don't have an option to restart my webserver as I am on a virtual host. A thumbnail will show up if I do "make highlight" at the top left hand of the screen but thats it and of course thats always the first image. I set up debug mode, but I am not sure how to view it. I also can't find the folder where the thumbnails are stored. I tried to run the thumbnail generation thing and got a 500 error.
http://mike-m.org/gallery
Posts: 32509
if you get a 500 error, take a look at the apache error log. a 500 error itself doesn't help debugging.
Posts: 8
I got [Mon Jul 11 16:14:35 2005] [error] [client xx.xxx.xxx.xxx] Premature end of script headers: /powweb/web/cgi-bin/php4
Posts: 32509
hmm, seems to be a server configuration problem.
we can't do anything about it, your webhost admin would have to analyze the issue.
Posts: 8
That still doesn't explain why the thumbnails showed up and disappeared after a refresh. I am working on the php issue. They just updated to PHP 4.4 last night so maybe that fixed something?
Posts: 32509
oh, a new php version, 4.4.0 and our cookie fix is in
@topic:
there could be various reasons why you don't see the image after refresh:
- either the image couldn't be stored in g2data/cache/derivative/...
- or it can't be read / outputted
Posts: 6
also coming back to my original issue (all at the top):
- the data is definitly stored in the /derivative/ folder after a jpg is uploaded and a thumbnail created.
- on the second point: how can I check, if (and why) the data can't be read? I really don't get the debug mode outputs that are generated in -immediate debug mode-
Posts: 32509
looking at the immediate debug:
Warning: ini_set() has been disabled for security reasons in /usr/export/www/vhosts/funnetwork/hosting/schneiderweisse/gallery2/modules/core/classes/Gallery.class on line 641
not dramatic, but may be an issue.maybe this gets outputted before the actualy binary image data
if i browse to http://schneiderweisse.sc.funpic.de/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=22&g2_serialNumber=2
Firefox says that the image contains errors.
so it gets written to the filesystem. but maybe it gets written in a corrupted state or the corruption happens when readind and outputting.
aha, Internet explorer returns more for the direct image request:
[code:1]br />
<b>Warning</b>: ini_set() has been disabled for security reasons in <b>/usr/export/www/vhosts/funnetwork/hosting/schneiderweisse/gallery2/modules/core/classes/Gallery.class</b> on line <b>641</b><br />
<br />
<b>Warning</b>: ini_set() has been disabled for security reasons in <b>/usr/export/www/vhosts/funnetwork/hosting/schneiderweisse/gallery2/modules/core/classes/Gallery.class</b> on line <b>642</b><br />
<br />
<b>Warning</b>: set_time_limit() has been disabled for security reasons in <b>/usr/export/www/vhosts/funnetwork/hosting/schneiderweisse/gallery2/modules/core/classes/Gallery.class</b> on line <b>840</b><br />
ÿØÿàJFIFÿþ;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 75
ÿÛC
$.' ",#(7),01444'9=82<.342ÿÛC
2!!22222222222222222222222222222222222222222222222222ÿÀq–"ÿÄ
ÿĵ}!1AQa"q2?‘¡#B±
Posts: 32509
question:
when you go to the installer or upgrader, in the system checks step, don't you see a warning because set_time_limit is disabled?
Posts: 32509
ah, wait. in immediate debug mode, we change the error level of php.
so probably these ini_set / set_time_limit warnings are not the problem.
can you disable the debug mode (false)?
Posts: 8
We appear to have the same issue.
Posts: 32509
mackworth, in the system checks page of the upgrader, do you get any warning (e.g. file integrity warning)?
can you post a link to a phpinfo page?
Posts: 8
For some reason I was missing imageframe stuff. Everything it working now. I wonder why they showed up the first time?
Posts: 32509
mackworth, great. what do you mean with " I wonder why they showed up the first time?"
mes0, please check your system checks step too for any warnings.
and please disable the immediate debug mode.
Posts: 6
ok, back from holidays and disabled the immediate debug mode.
Here are the warnings:
exec() allowed
Maximum upload size (1024Kb)
Everything else is ok.
Posts: 6
next thing i did, was editing out line 641, 642 and 840 in Gallery.class and for the time beeing, it works.
Posts: 32509
you have a lot of disabled functions, but it should still work with gd.
you'll have problems with any operations that take more than a few seconds.
actually, that could be it.
your host has dissallowed set_time_limit().
and we call this function when outputting image data.
so if your php warning level is high enough, you'd have corrupted image downloads.
i wanted to verify my theory by looking at the transfered data, but when i browse now to your website, i see thumbs etc.
issue solved?
Posts: 6
actually the issue is solved, by disabling set_time_limit() in Gallery.class;
Nevertheless, I already noticed, that with a sometimes slow server connection, no images are shown (as you wrote above). But a reload always helps. It's not the perfect solution, but with the restrictive settings by my provider, I think it's a suitable one.
thanks for that.
Posts: 32509
we use set_time_limit() all over. you will not be able to use add from local server to add items recursively, or maintenance -> build all thumbs / resizes, or import from G1, ... all tasks that take more than your execution time limit won't work.