Pics not showing up in Album Pics not showing up in Album
 

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

Pics not showing up in Album

Started by gtk, January 15, 2006, 05:17:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gtk

For an album, I went into admin menu, and I chose "delete original size photo".   Now, when I try to view that album, not all ictures are showing up.    Coppermine still thinks that some of the pictures still have an "intermediate" file.

How does coppermine determine whether to use the original file for display, or the "normal_" prefix file ?   

my coppermine is not modified.

Joachim Müller

if the full-size pic is larger (in terms of dimensions) than the intermediate size set up in coppermine's config, the intermediate sized pic won't be deleted. Exception: if you enable the option not to create an intermediate pic at all, then all intermediates are suppossed to be deleted when using the option in admin tools you refer to. However, I think there has been issues with this feature in older versions, so I suggested you post a link to your site to let us see what version you're using.

gtk

Thx for the reply.

All my sytem info is in my sig.  I'm running cpg 1.3.5.

I have it configured for itermediate pictures.

Coppermine is successfully deleting the full-size picture, but when you go back and view the album, coppermine still thinks the intermediate exists.

Is this the code in displayimage.php that determines whether an intermediate pics exists or not ?

   if ($mime_content['content']=='image') {
        if (isset($image_size['reduced'])) {
            $winsizeX = $CURRENT_PIC_DATA['pwidth'] + 16;
            $winsizeY = $CURRENT_PIC_DATA['pheight'] + 16;

gtk


gtk


gtk

Am I providing enough information in my question ?

Nibbler

Post a link to your site as suggested.

gtk

Here is an example:

http://www.msdeer.net/photos/displayimage.php?album=89&pos=0

Also,  Sometimes when a user uploads a large pic, I will run "convert" against it, to resize it and compress it.   That results in the "filesize" and "total filesize" not being accurate in the database.

I am working on a quick unix script to compare the database vaules for "filesize" and "total filesize', and update the database when it finds differences...  (after I back everything up, of course)....



Joachim Müller

The missing normal-sized pic is suppossed to be at http://www.msdeer.net/photos/albums/userpics/normal_4%20PT.jpg
This is not possible, there mustn't be files directly in the userpics folder unless you did something wrong in the first place and FTP-uploaded pics there. Please confirm if that's what you did.

gtk

#9
I do not allow most users to have their own Album, so all pics they upload end up in "userpics".  Why are pics not supposed to be in "userpics" ?  That is where coppermine is putting them...

I copied the full-size file to "normal_4 PT.jpg" and it displayed correctly.  Then I went back into admin tools and deleted original sized photo.   The same thing happened, its still looking for "normal_4 PT"..


Thx for looking....


Greg

Joachim Müller


gtk

Quote from: GauGau on January 21, 2006, 06:13:59 AM
are you running safe mode?
i'm not sure...  are you talking safe_mysqld ?

Joachim Müller

#12
Split unrelated reply to this thread into a separate thread: cpg1.3 Upload.

http://forum.coppermine-gallery.net/index.php?topic=26799.0




Quote from: gtk on January 22, 2006, 04:41:19 AM
i'm not sure...  are you talking safe_mysqld ?
I'm refering to PHP's safe mode (it's an option in php.ini)

gtk

PHP was compiled with " -enable-safe-mode'"

Joachim Müller

hm, do you really need safe mod? If the server is yours to administer, I recommend turning it off (recompiling PHP without that option, that is).

gtk


gtk

If someone can just point me to the code that determines whether to preface the picture with "normal_" or not, I can try and debug it..

thx

Nibbler

It's in displayimage.php


    if($CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
      $condition = true;
    }elseif($CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
      $condition = true;
    }elseif($CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
      $condition = true;
    }else{
     $condition = false;
    }

    if ($CONFIG['make_intermediate'] && $condition ) {
        $picture_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
    } else {
        $picture_url = get_pic_url($CURRENT_PIC_DATA, 'fullsize');
    }


The code is fine, it's likely due to bad file dimensions in the db. If you upgrade to 1.4 then you can have Coppermine rescan the dimension information.

gtk

i just upgraded on my test box to 1.4.3 (Very quickly & easy I have to say).

How do you rescan the dimension info.  I could not find that in the docs anywhere..

Thx

Nibbler

It's in admin tools - 'Reload file dimensions and size information'