Need to change the filenames Need to change the filenames
 

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

Need to change the filenames

Started by tybi, August 24, 2007, 11:38:46 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

tybi

Hi I am a new here, sorry if I posted this to the wrong topic.

After upgrading from version 1.3.2 to the recent 1.4.12 I had problems with charsets. I solved it as stanaka's post says: http://forum.coppermine-gallery.net/index.php?topic=24129.0
I changed this:

function cpg_db_connect()
{
        global $CONFIG;
        $result = @mysql_connect($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass']);
        if (!$result) {
                return false;
        }
        if (!mysql_select_db($CONFIG['dbname']))
                return false;
        mysql_query("SET NAMES 'utf8'",$result);  <=== inserted this code
        return $result;


The pictures were uploaded, unfortunately, with special characters in the filenames: í,é,ž,ř,č,š, etc. It worked with the old version. Now, the "charset fix" (I guess) caused that the pictures which use these special chars, don't show up. IE6 does not show any picture, even if it is not using special chars.

My link is: http://www.sweetmonkeys.net/cpg132/index.php

Thank you so much for any help.

tybi

Only the thumbnails don't show up, full size pictures do. So i guess the problem is not the filenames.

I tried to update the thumbnails in Admin tools, but I got only:

Updating thumbnails and/or resized images, please wait...
ERROR creating : albums/userpics/thumb_1.jpg
ERROR creating : albums/userpics/thumb_2.jpg
ERROR creating : albums/userpics/thumb_3.jpg
... etc.

Anyone has an idea how to solve this? Please...

Joachim Müller

Your files simply are not there. Did you follow the upgrade docs?

tybi

Quote from: GauGau on August 27, 2007, 11:32:30 AM
Your files simply are not there. Did you follow the upgrade docs?

Yes, of course, I did... and precisely.

You are right, the thumb files are not there. But I didn't delete them... I don't know how it happened ???.

Anyway, I have my backup... Can I just upload the thumb files?

tybi

Quote from: tybi on August 27, 2007, 01:20:04 PM
Yes, of course, I did... and precisely.

You are right, the thumb files are not there. But I didn't delete them... I don't know how it happened ???.

Anyway, I have my backup... Can I just upload the thumb files?


Ok, I uploaded those files and thumbnails with no special characters in filenames are fine. Thank you Gau Gau for the first step.

But what can I do about the file names where the special characters are.
An example of such filename: Snímek 163.jpg
http://www.sweetmonkeys.net/cpg132/displayimage.php?album=28&pos=0

Nor the thumbnail nor the full size picture is showing.

Is it enough to convert it to: snimek_163.jpg in the database???

Joachim Müller

Quote from: tybi on August 27, 2007, 03:44:12 PM
Is it enough to convert it to: snimek_163.jpg in the database???
Would be enough. But I suggest adding í to the list of forbidden chars and then re-running the admin tools.