Wrong error upload filesize > filesize in config Wrong error upload filesize > filesize in config
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Wrong error upload filesize > filesize in config

Started by altenae, November 10, 2011, 09:26:00 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

altenae

This issue still excists on all of my three coppermine galleries (1.5.16)

http://forum.coppermine-gallery.net/index.php/topic,61711.0.html

The only thing wrong is the filesize.
In the config 512kb
If I upload 600 kb I would expect to get this error:

if (filesize($uploaded_pic) > ($CONFIG['max_upl_size'] << 10)) {

        @unlink($uploaded_pic);
        cpg_die(ERROR, sprintf($lang_db_input_php['err_imgsize_too_large'], $CONFIG['max_upl_size']), __FILE__, __LINE__);

Αndré

I assume this is exactly the same issue like here, so please try that fix and report if it works as expected.

altenae

Changed in the db_input.php

if (filesize($uploaded_pic) > ($CONFIG['max_upl_size'] << 10))

into

if (filesize($uploaded_pic) > ($CONFIG['max_upl_size'] * 1024))

The result is the same.
I have put a print statement and it looks like it never comes to this code.
Strange, because the only thing wrong is the filesize which is larger than I have configured in the config.

Edward

Αndré

Don't forget to add
die();
after your print statement. I'll also perform some tests asap (which might take some time these days).


altenae

Hi Andre,

The line you are referring to is present in the upload.php ?

If so , I can.t find any line with "name="MAX_FILE_SIZE" in it...

Edward

Αndré

It's that line in upload.php:
array('MAX_FILE_SIZE', $max_file_size, 4),

altenae