Pah! Is it really like that? Relative paths to images that are already in the cache. Query strings for images that are not yet in the cache? Extremely unfavorable! A problem! I absolutely need all images already in the "cache". (I think that's not good with on the fly and the cache anyway).
Why I need it because I work with hard links. That's going to be a problem anyway.
No no no. Not a good idea.
In my gallery only the thumbnails in the album pages are released for search engines. All other images are indexed locked, even hotlinking locked. For this I use soft links for the image source of the thumbnails in the album pages (thumbs->cache), and (str_replace ("/cache/", "/thumbs/", ...)). /cache is locked. /thumbs is free. The next problem with this is that there is no function getAlbumThumbImage() and getImageThumb(), only printAlbumThumbImage() and printImageThumb(). So I have to make a core hack first (swap echo for return), and then adjust the code in the theme. Very inconvenient.
And the problem with the image source path with query string destroying this all.
I have only found the Python third party scripts for pre-chaching and i will not use it. Python scripts are not a solution.
Big problem.
Why I need it because I work with hard links. That's going to be a problem anyway.
can you explain where do you use hard link ?
note there is a zenphoto internal behavior that generates a cache size "on the fly" on hard link of a "no yet" cached picture.
for example, if you use[img]/cache/myalbum/mysubalbum/PICT0001_200_thumb.jpg[/img]somewhere in your site, zenphoto looks your the relevant cached picture. if not exists, zenphoto generates it.
of course, you have to know the internal structure of these links if you want to use them directly.
OK. Not good. How can I cache all images?
you can use the plugincacheManager, album per album, or for your whole gallery.
Wohooo! That's a huge security hole! Anyone can create an infinite number of files on my server if he changes the variables in the query strings. Anyone can flood my server with image cache files!
I have tested it.
damned! I had so much hope in Zenphoto. Now everyone is gone.
There is a flood protection built in actually, there is an option for image processor security (Options > Security), and you can additionally obscure cache filenames (for the created ones though).
Even we didn't ever have any problem with someone flooding the site
malte surely would give you more technical advices about that
What the hell? Who programmed the plugin cacheManager? I have ~ 15000 photos and these all are loaded on the plugin page. 15000 images in one HTML page. -> extremely overloaded browser. I'm really not happy.
The Plugin cacheManager don't work.
[code]Refreshing cache for Gallery
Apply 40_cw40_ch40_thumb
Apply 80_cw80_ch80_thumb
Apply 200_thumb
Apply 600
5 cache sizes to apply.[/code]
There are 4, not 5.
[code]Finished processing 14087 images (70435 cache sizes requested).[/code]
It's a lie.
[code]$ find /albums -type f | wc -l
14088[/code]
14088 x 5 = 70435
[code]$ find /cache -type f | wc -l
4988[/code]
I can create many many images on all Zenphoto installations, there have the "on the fly" image source paths.
Example with a image source from a thumbnail.
/zp-core/i.php?a=myalbum&i=PICT0001.JPG&s=200&cw=0&ch=0&q=75&t=1&wmk=%21&check=a0c7449ecd9fcf980facfd44fef0b301a9f66cf6
/cache/myalbum/PICT0001_200_thumb.JPG
200px × 150px
5,27 KB (5.397 Byte)
/zp-core/i.php?a=myalbum&i=PICT0001.JPG&s=1000&cw=800&ch=800&q=75&t=1&wmk=%21&check=a0c7449ecd9fcf980facfd44fef0b301a9f66cf6
/cache/myalbum/PICT0001_600_cw800_ch800_thumb.JPG
800px × 600px
29,14 KB (29.837 Byte)
/zp-core/i.php?a=myalbum&i=PICT0001.JPG&s=800&cw=500&ch=500&q=75&t=1&wmk=%21&check=a0c7449ecd9fcf980facfd44fef0b301a9f66cf6
/cache/myalbum/PICT0001_600_cw500_ch500_thumb.JPG
500px × 500px
19,68 KB (20.154 Byte)
/zp-core/i.php?a=myalbum&i=PICT0001.JPG&s=400&cw=10&ch=300&q=75&t=1&wmk=%21&check=a0c7449ecd9fcf980facfd44fef0b301a9f66cf6
/cache/myalbum/PICT0001_400_cw10_ch300_thumb.JPG
10px × 300px
1,19 KB (1.216 Byte)
/zp-core/i.php?a=myalbum&i=PICT0001.JPG&s=400000000&cw=10000000&ch=3000000000&q=75&t=1&wmk=%21&check=e0c7449ccd9fcf980facfd44fef0b301a9f66cf8
/cache/myalbum/PICT0001_600_cw10000000_ch3000000000_thumb.JPG
...
endless...
"What the hell? Who programmed the plugin cacheManager? I have ~ 15000 photos and these all are loaded on the plugin page. 15000 images in one HTML page. -> extremely overloaded browser. I'm really not happy."
Well, then maybe you should do your caching by album. These are abilities you have, just do a little familiarization with the software and don't use the features that do not suit you.
hi stephen
happy to read your contribution here.
as an "old" user, I have to admit that I don't full understand some options.
maybe an explanation for them may help, wibbi, me and other.
Security>Obscure cache filenames
Security>Image Processor security
Images>Protect image cache
Images>Secure image processor
Images>Full image protection
Why don't you try creating an image by forging the link above with different sizes and see how well it works for you.
I did it! you can create endless images on foreign servers if you have an image source path with querystring. If you study the Zenphoto source code, you can create a query string on any Zenphoto installation and create files on all Zenphoto installations. Sorry, this is a no go that anyone can create files on my server.
Muahahaha. Plugin cacheManager -> author: Sbillard
Hey, nobody is perfect! ^^
then maybe you should do your caching by album.
Yes, I would like that, but with Zenphoto. I have already made suggestions. It would be best if all thumbs and resizes were created directly when visiting the image edit page (list). I said it a few days ago that "on the fly" is a nice gimmick, but nothing more, and now it's a nasty gimmick.
In addition, it would be better if the different image sizes were saved in different folders, without renaming.
/albums
/resize
/thumbs
/adminthumbs
...
This is much better, because you can work much better with it, such as with soft links and htaccess and and and. Everything in a folder is always bad.
wibbi
you come from another software and it may have a different philosophy about some stuffs.
sometimes it takes a time to understand all the features of the new software and to work with.
you come for asking explanations about how zenphoto works (and you have very specific questions).
but the first thing is to stay correct on the forum and with the people who answer to you.
thank you
to generate cached pictures for an album, go to admin>albums and for each album you have a "cache album images" link.
it works the same as "cache manager" link, but only for the relevant album.
and my personnal use of "cache manager" is to cache all pictures, cache size per cache size (and refresh my browser if needed), because I know and admit that zenphoto can't do "all in one".
my site is closed when I do this kind of update.
Security>Obscure cache filenames
"Cause the filename of cached items to be obscured. This makes it difficult for someone to "guess" the name in a URL."
enabled
Thumbnail
/cache/myalbum/2b47c9c220bae19838440035e176c40a249d53dc.PICT0001_200_thumb.jpg
it is a joke?
Security>Image Processor security
"Add a security parameter to image processor URIs to prevent denial of service attacks requesting arbitrary sized images."
The problem is here not the "requesting", but the creating and saving.
I do not recognize any effect by enable "Image Processor security". What exactly does this option do? I notice nothing.
Images>Protect image cache
"If checked all image URIs will link to the image processor and the image cache will be disabled to browsers via an .htaccess file. Images are still cached but the image processor is used to serve the image rather than allowing the browser to fetch the file."
Another interesting gimmick, but just a gimmick. At least it works. Unfortunately it has a "warning". And image source paths with query string.
Images>Secure image processor
"When enabled, the image processor will check album access credentials."
What? Is not that a standard? Every can see protected and not published albums and images?
Images>Full image protection
"Unprotected allows direct display of the image."
That's my setting. Best.
"Disable hotlinking"
Don't work with the image source paths with query string and the image source path to the /cache folder. Also don't work.
go to admin>albums and for each album you have a "cache album images" link.
OK. Thank you very much for this note. I accept that as a solution, for me. Even if that means more work for me and I must not forget it, especially if I move images. (I have the information that the images in the folder /cache are not moved.)
Nevertheless, the problem remains that with the image source paths with query string any one can create zenphotos files on the server. That's a no go! And there are no arguments to justify that.