[solved][newbie][batch] no thumbnails [solved][newbie][batch] no thumbnails
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[solved][newbie][batch] no thumbnails

Started by TigerDE2, August 07, 2004, 04:03:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TigerDE2

Hi everybody!
I just installed the latest stable release (cpg 1.3.1) and renamed the albums/ folder into alben/.
I also changed the config settings accordingly.
The alben/ folder and all subfolders have chmod 777.
I uploaded one picture into /alben/portraits/heute/ and made sure its chmod is set to 644.
I checked it by opening it directly in FireFox. It works. (77.1 KB (78951 Bytes); 858px x 558px)
I then tried to run the batch mode, in order to test it.
But the batch mode page (/searchnew.php?startdir=portraits/heute) only showed broken thumbnails. (No pictures are shown.)
When I called showthumb.php?picfile=portraits%2Fheute%2Fabi_01_011.jpg&size=48, it first said the file was invalid. After reloading, there's only my browser's broken image symbol left.
However, the original picture is a valid jpg.
What's wrong?
How can I fix this problem?
Regards,
Christian

P.S.: Sorry, if my problem was already dealt with. In that case, I'd be happy if you could provide a link to the correspoinding thread. Thanks. :)

Server:
PHP Version 4.3.4
System    Linux turboamy 2.4.26 #3 Sun Jun 13 21:14:47 CEST 2004 i686
Build Date    Mar 21 2004 22:41:41
SERVER_SOFTWARE    Apache/2.0
I'm using Image Magick, though GD is installed.

UPDATE:
It seems changing encoding in your config back to ISO solves the problem.

If you switched to utf-8 in between, that is.
See further down for further info. :)

TigerDE2


Joachim Müller

Quote from: TigerDE2 on August 07, 2004, 04:03:27 PM
[...] I uploaded one picture into /alben/portraits/heute/ and made sure its chmod is set to 644 [...]
It shouldn't be CHMODed 644 (which means read and execute only), it must be CHMODed 777 or 755 (write permissions for the user PHP runs under, depending on your server setup). The instructions clearly say that the albums folder and all files and folders within it must have write permissions set up for PHP: http://coppermine.sourceforge.net/manual.php#how

GauGau

TigerDE2

Hi GauGau!
Well, the readme states
QuoteCHMOD the folders albums and include to 755 (or 777, depending on your server config)
which is exactly what I did: I chmoded the directories.
And my config page has an option "Standard-CHMOD for files: [0644]".
That's why I thought it woukd be 644 for pictures.
I now changed the chmod of the pics and directories acordingly. (all to 777)
However, it still does not work. :(
Any suggestions?
(Meanwhile, I'll re-read the readme, to make sure I didn't miss something...)
Christian

TigerDE2

I just installed a second instance of gallery into a different folder, and it is - for reasons beyond my understanding - working.
I think I will now remove both galleries and set a new one up again in the location I want it to be.
Thanks for your help, anyway. :)
Christian

Joachim Müller

Quote from: TigerDE2 on August 07, 2004, 10:26:40 PM
Hmm.
I think I just found a bug report related to my problem:
http://forum.coppermine-gallery.net/index.php?topic=8477.0
This is not an actual bug, but a potential one nobody was able to replicate so far. Be carefull to shout "bug"...
Your issue is not related, re-CHMOD the albums folder and everything in it as suggested.

GauGau

TigerDE2

Oh, by the way:
Why can't I add pictures which are directly inside the albums/ folder?
It only works in subfolders...  :-\\
Regards,
Christian

Joachim Müller

This is by design. It takes little effort for you to create subfolders, but it'd be a huge effort to explain the pros and cons to you, which would basically be dev talk that probably wouldn't mean much to you anyway. It wouldn't result in anything else except you nodding and saying "ah ok, I see", but you still wouldn't be able to add files dumped directly into the albums folder.
Could we keep this discussion to your initial problem instead of asking "why is coppermine doing things in the way it does"?

GauGau

TigerDE2

Sure. :)
And in order to get back on topic:
I think I know why thumbs break.
It's the encoding you choose.
ISO works, UTF breaks the thumbs.
I've tested it and switched between English (ISO) and German utf-8 and then back to German (ISO) and afterwards to English utf-8 and the problem can indeed be reproduced.
Going to point this out in the bug report as well.
Any ideas why this happens?
(Um, okay, this is getting off topic again, but anyway. Plus, even though I'd just nodd, I'm still a little curious in why exactly you can't upload to the albums root. I'm learning PHP at the moment, and this dev stuff might be interesting... :) )
Regards,
Christian

Casper

Imagine this.  You have been running your gallery for a while, and you have now several hundres pics uploaded, all in the albums folder, but not in sub-folders.
Now, every time you want to batch add, coppermine has to load all several hundred thumbs, very time and resourse consuming. And you, as admin, have to weed through them all to find the ones you want. 
As gaugau said, creatingfolders to put them in is simple, indeed you can even upload complete drectories from your harddrive, and simply chmod when done.  It makes admin of the galleries so much easier, especially if you mirror your cats/albums structure in the albums directory.

And this is just for a few hundred pics.  We know of galleries with over 200,000.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

TigerDE2

In order to meet GauGau's prediction:
Well, that makes sense... ;)
Though there would sure be a way to only list not yet included photos, wouldn't there? ;) :D
Anyway. I think, once my experience has been confirmed, this topic can be closed.
Regards,
Christian

Joachim Müller

Quote from: TigerDE2 on August 08, 2004, 01:31:01 PMThough there would sure be a way to only list not yet included photos, wouldn't there? ;) :D
no, there's no way to do this, the routine has to loop through all files or no files at all. If you're in the middle of teaching yourself php, look up the function getfoldercontent in searchnew.php, there are tons of interessting things to discover if you try to understand the loop and look up the php functions you don't know on http://www.php.net, e.g. readdir

I think this thread has had enough of thread drift, I'll lock it now.