Hello,
When I crop an thumbnail, after done one or more are not showing in menu. I used external places for images, but this is not a problem, because photos always return ( FireBug ), but in HTML page I cannot see them.
For better fun, when I used FireBug and check <img> element they're... exists, so where is the fail of script? How can I fix that? I try with headers, imagecreatefrom... functions, nothing work.
Comments
SERVERCACHE . getImageCacheFilename(filesystemToInternal($album), filesystemToInternal($image), $args)
When I used static files evyrthink is OK, so in that line is problem. Please, check it.
function: cacheImage
This is the function where script looses new thumbnails...
You did also mention something of external. So do you use i.php directly and when from where do you use it. Same server, different server, same site?
If on a Zenphoto theme we have images theme and object model functions to create thumbs as well.
This all might be important to find any possible bug.
`if (!$debug) {
if(file_exists($path)) {
header('Last-Modified: '.gmdate("D, d M Y H:i:s", $fmt).' GMT');
$suffix = getSuffix($newfilename);
$imageSize = filesize($path);
switch ($suffix) {
case 'bmp':
$suffix = 'wbmp';
break;
case 'jpg':
$suffix = 'jpeg';
break;
case 'png':
case 'gif':
case 'jpeg':
break;
default:
pageError(405, gettext("Method Not Allowed"));
exit();
}
$imageFunction = 'imagecreatefrom'.$suffix;
if(function_exists($imageFunction)) {
$imageObject = $imageFunction($path);
if(is_resource($imageObject)) {
$imageShowFunction = 'image'.$suffix;
if(function_exists($imageShowFunction)) {
header('Content-Type: image/'.$suffix);
header('Content-Length: '.$imageSize);
$imageShowFunction($imageObject);
imagedestroy($imageObject);
unset($imageFunction);
unset($imageObject);
unset($imageShowFunction);
}
}
}
/*if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && trim($_SERVER['HTTP_IF_MODIFIED_SINCE']) == gmdate("D, d M Y H:i:s", $fmt).' GMT') {
header('HTTP/1.0 304 Not Modified');
header('Content-Length: 0');
}*/
}
} else {
echo "\n
Image:
";}`
From the example: Why don't you use the object model and the existin image functions? I might not understand what you are doing why of course.
I have a path, but I can't use Location header, because that data is hidden from people and I don't have any public domain which can saw them, so I read them as You see upper. This is OK, but why sometimes after modify thumbnails I see only URL with anchor, to better fun when I click in Firefox 'Refresh image' they're shown, so?
Sometimes they not returned the image but only for first click, files was created, added to DB, everythink cool, but showing fail. You know why I do that?
PS. I cannot update zenPhoto as fast as You can do. This is modify in multiple places, so updating after ~2 weeks is not fun for me, for You too, as You work as developer and You know about merging and finding differences :-)
http://php.net/manual/en/book.image.php
PS. I cannot update zenPhoto as fast as You can do. This is modify in multiple places, so updating after ~2 weeks is not fun for me, for You too, as You work as developer and You know about merging and finding differences :-)
Well, if you don't modify the core files - which is exactly for that reason not recommended - that is not that much of a problem normally.