Advanced search  

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]

Pages: [1] 2   Go Down

Author Topic: cannot upload any pictures :o(  (Read 10268 times)

0 Members and 1 Guest are viewing this topic.

vlkoun

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
cannot upload any pictures :o(
« on: July 16, 2010, 10:46:39 am »

Hi guys.
First I'd like to thank you a LOT for making such a wonderful piece of software. I've been using it since 2008.
My first gallery (1.4xx) runs on: www.vlkoun.cz/foto and is still perfect.
This week I've tried to instal last version of coppermine to www.vlkoun.cz/gallery
Everything seems to be ok, install process didn't show me any error message. I run it on the same sql databese, only the tables have different prefix, so I think it's ok that way.
Now I'm trying to upload a picture but I'm not able to do it :o(
I've tried single and multi picture upload via administration, also ftp upload which I use on older copper version.
It's still not working.
Could you please be so kind to check it for me? Thank you a lot!

www.vlkoun.cz/gallery
test
test
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cannot upload any pictures :o(
« Reply #1 on: July 16, 2010, 11:10:37 am »

Quote
Error
Only files with the following extensions are accepted:

Please check your config section which file types you allow ('File settings -> Allowed xyz types').
Logged

vlkoun

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: cannot upload any pictures :o(
« Reply #2 on: July 16, 2010, 11:35:24 am »

Please check your config section which file types you allow ('File settings -> Allowed xyz types').

I have double checked it already:
jpeg/jpg/png/gif
asf/asx/mpg/mpeg/wmv/swf/avi/mov

I didn't make any chanhge in configuration except debug mode for everyone.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cannot upload any pictures :o(
« Reply #3 on: July 16, 2010, 11:44:18 am »

Maybe something went wrong during the installation. Have you already tried to re-install cpg1.5.6?
Logged

vlkoun

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: cannot upload any pictures :o(
« Reply #4 on: July 16, 2010, 11:48:21 am »

Maybe something went wrong during the installation. Have you already tried to re-install cpg1.5.6?

Yes
Can't you find out from some debug message what the problem is?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cannot upload any pictures :o(
« Reply #5 on: July 16, 2010, 12:07:03 pm »

For some reason your $CONFIG array (or at least that value) isn't populated.

Can you please open db_input.php, find
Code: [Select]
cpg_die(ERROR, $lang_db_input_php['err_invalid_fext'] . ' ' . $CONFIG['allowed_file_extensions'], __FILE__, __LINE__);and replace it with
Code: [Select]
cpg_die(ERROR, $lang_db_input_php['err_invalid_fext'] . ' ' . $CONFIG['allowed_file_extensions'] . print_r($CONFIG, true), __FILE__, __LINE__);
This doesn't solves your issue, but gives us (me) some more information what may has gone wrong.
Logged

vlkoun

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: cannot upload any pictures :o(
« Reply #6 on: July 16, 2010, 12:15:01 pm »

Done
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cannot upload any pictures :o(
« Reply #7 on: July 16, 2010, 12:49:32 pm »

You can undo that change.

As expected, $CONFIG['allowed_file_extensions'] is empty. As far as I can see it is set in this function:
Code: [Select]
function cpg_get_type($filename,$filter=null)
{
    global $CONFIG;

    static $FILE_TYPES = array();

    if (!$FILE_TYPES) {

        // Map content types to corresponding user parameters
        $content_types_to_vars = array(
            'image'    => 'allowed_img_types',
            'audio'    => 'allowed_snd_types',
            'movie'    => 'allowed_mov_types',
            'document' => 'allowed_doc_types',
        );

        $result = cpg_db_query('SELECT extension, mime, content, player FROM ' . $CONFIG['TABLE_FILETYPES']);

        $CONFIG['allowed_file_extensions'] = '';

        while ( ($row = mysql_fetch_assoc($result)) ) {
            // Only add types that are in both the database and user defined parameter
            if ($CONFIG[$content_types_to_vars[$row['content']]] == 'ALL' || is_int(strpos('/' . $CONFIG[$content_types_to_vars[$row['content']]] . '/', '/' . $row['extension'] . '/'))) {
                $FILE_TYPES[$row['extension']]      = $row;
                $CONFIG['allowed_file_extensions'] .= '/' . $row['extension'];
            }
        }

        $CONFIG['allowed_file_extensions'] = substr($CONFIG['allowed_file_extensions'], 1);

        mysql_free_result($result);
    }

    if (!is_array($filename)) {
        $filename = explode('.', $filename);
    }

    $EOA            = count($filename) - 1;
    $filename[$EOA] = strtolower($filename[$EOA]);

    if (!is_null($filter) && array_key_exists($filename[$EOA], $FILE_TYPES) && ($FILE_TYPES[$filename[$EOA]]['content'] == $filter)) {
        return $FILE_TYPES[$filename[$EOA]];
    } elseif (is_null($filter) && array_key_exists($filename[$EOA], $FILE_TYPES)) {
        return $FILE_TYPES[$filename[$EOA]];
    } else {
        return null;
    }
}

Are you able to debug this yourself? I never had a deeper look at this function and am currently short of time. But it cannot hurt to output all variables and array of that function.
Logged

vlkoun

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: cannot upload any pictures :o(
« Reply #8 on: July 16, 2010, 01:28:55 pm »

Unfortunatelly I'm not able to fix this myself :(
I really don't understand why it happend. It doesn't respect my setting in configuration menu.
Could you send me a copy of good "functions.inc.php" file so I can fix it myself?
Thank you
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cannot upload any pictures :o(
« Reply #9 on: July 16, 2010, 02:19:39 pm »

Can you please extract and upload the attached file to the gallery/ folder of your server?
Logged

vlkoun

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: cannot upload any pictures :o(
« Reply #10 on: July 16, 2010, 02:50:17 pm »

Can you please extract and upload the attached file to the gallery/ folder of your server?

done
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cannot upload any pictures :o(
« Reply #11 on: July 16, 2010, 05:09:27 pm »

Please check if the filetypes table exists in your database.
Logged

vlkoun

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: cannot upload any pictures :o(
« Reply #12 on: July 16, 2010, 08:00:32 pm »

Please check if the filetypes table exists in your database.

Yes it does.
You can check attached pictures.
First is a screenshot from my DB administration, second is a screenshot from filetype editor plugin which I've tried today to fix my problem.
I don't know how to save changes when I check some of the listed options (for example, jpg, jpeg, gif).
There is no such button like SAVE. Only: delete selected filetype, add new filetype
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: cannot upload any pictures :o(
« Reply #13 on: July 17, 2010, 07:44:55 am »

Temporarily switch to English before taking a screenshot that you plan to post here. Afterwards, change the language back. This can be accomplished easily both in Coppermine as well as phpMyAdmin. None of the devs and supporters speaks Czech.
You haven't configured http://www.vlkoun.cz/gallery/, as the gallery name still says that it's "Your gallery name here", which is something you can't get away with during initial configuration. I guess that you haven't gone through Coppermine's config and haven't set it up properly.
Logged

vlkoun

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: cannot upload any pictures :o(
« Reply #14 on: July 17, 2010, 10:07:53 am »

Ok with czech lang. I'll do it next time.
But  I'm affraid you're wrong about initial configuration.
I did all the steps and there was no name change at all :(
Maybe in old install? I used a new one. I'll try the old one.
And what about that test.php you wanted me to to copy to my gallery? Any ideas from that?
I'm sad that I have to bother you guys, maybe I'll switch to 1.4x version instead? It was working for me fine.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cannot upload any pictures :o(
« Reply #15 on: July 17, 2010, 10:27:15 am »

The test.php should output more just an empty array. Seems that there's an encoding issue with your filetypes table. Can you take a screen shot of the content of that table with phpMyAdmin? Or even give me access to your database via phpMyAdmin?
Logged

vlkoun

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: cannot upload any pictures :o(
« Reply #16 on: July 17, 2010, 10:29:22 am »

Sure, Can I give you my pass via PM?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cannot upload any pictures :o(
« Reply #17 on: July 17, 2010, 10:55:48 am »

I sent your my contact information via PM, as regular users aren't allowed to use PMs.
Logged

vlkoun

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: cannot upload any pictures :o(
« Reply #18 on: July 17, 2010, 12:22:05 pm »

Did you get my email?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: cannot upload any pictures :o(
« Reply #19 on: July 17, 2010, 01:49:11 pm »

Yes. I'm not 24/7 on my PC ;)
Logged
Pages: [1] 2   Go Up
 

Page created in 0.026 seconds with 20 queries.