forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 upload => Topic started by: altenae on November 10, 2011, 09:26:00 pm
-
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__);
-
I assume this is exactly the same issue like here (http://forum.coppermine-gallery.net/index.php/topic,73722.msg355072.html#msg355072), so please try that (http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.5.x/upload.php?r1=8273&r2=8272&pathrev=8273) fix and report if it works as expected.
-
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
-
Don't forget to add
die();
after your print statement. I'll also perform some tests asap (which might take some time these days).
-
Good news: http://forum.coppermine-gallery.net/index.php/topic,61711.msg355945.html#msg355945
-
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
-
It's that line in upload.php:
array('MAX_FILE_SIZE', $max_file_size, 4),
-
Yep,
Works correct now.