The filesize of the uploaded image is too large The filesize of the uploaded image is too large
 

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

The filesize of the uploaded image is too large

Started by johnwr, March 23, 2004, 01:08:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

johnwr

Hi

I am relatively new to Coppermine, and have a problem with some of my jpg pictures. Coppermine says the pic is too large. (Over 2048kB)
Most of my pictures uploads fine, but some of them doesn't. I don't understand where coppermine gets the stated 2048kB limit?

Here is some more or less relevant information about my system:

Image data from a picture that won't upload:
1704x2272x16M
True color RGB (24 bits)
Hor res: 300dpi
Ver res: 300dpi
Uncompressed
Filesize: about 460kB

My system:
2,6 GHz Pentium 4
1024 MB RAM
Windows 2000 SP4

Apache:
Apache Version  Apache/2.0.48 (Win32) PHP/4.3.4 mod_jk2/2.0.2  
Apache API Version  20020903  

php.ini:
memory_limit = 64M
post_max_size 48M
upload_max_filesize 48M

Other:
Coppermine version 1.2.1
GD Version  bundled (2.0.15 compatible)  
ImageMagick 5.5.7
MySQL version 4.1.1

Coppermine setup:
Uses ImageMagick (not GD)
Max size 4096kB
Max width pixels 2048 (The only place I could find this number)
Read EXIF No
Unicode (utf-8)

I have made a quick search in these forums, but couldn't find a solution to my problem.
Hopefully somebody knows.

best wishes
John

Casper

Log on in admin mode, go to config, and look for 'Max size for uploaded pictures (KB)'.  I think the default setting is 2048.  Change it to what you want.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

johnwr

I have already set this.
(As I said in the original post in the Coppermine setup part:
Max size 4096kB )

Anyway the image is 460kB...

John

Casper

This is probably caused by the image being too big in pixel size, for your resourses to cope.

Please read this thread, and the ones it links to.  Basically, try making the pics smaller in pixel size, as this is what matters when the images are being copied, not quality.

http://forum.coppermine-gallery.net/index.php?topic=3999
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

johnwr

Hi, and thanks for the replies. Your support is really valued.

There must be something else wrong.

I have read those three threads, and fully understand that it is the pixelsizes, not the filesizes that matters.
(Though the error message states it was the filesize.) Being a developer myself (newbie in PHP though...), I fully recognize these issues.

But, as I said, I have allocated 64MB memory to each process in my php.ini. That should be enough, shouldn't it? Even though the pixels are 2272x1704x16M. (I successfully upload 1600x1200x16M without problems.) I will try to increase this setting, but I hope the memoryhandling of the convertutility is a bit more memoryefficient than that? I use ImageMagick (as recommended by hyperion in http//coppermine.sourceforge.net/board/viewtopic.php?t=3417), the majority of issues in these treads deal with GD?

Of course I can resize the images before uploading them, but I can't make that demand of my familymembers that want to upload their pictures. They haven't got the computerskill to do that, it's a pain teaching them how to use a browser... Bandwidth isn't an issue, as I don't care for people with less than 1Mbit. ;-)

The fact that the errormessage states the 2048kB limit (which I can't find anywhere in any setup, since I have set this to 4096kB in the Coppermine setup), makes me suspect this is a limit set in the code somewhere? Perhaps for debugging purposes, and perhaps forgotten? Not very probable though, since this then would have been discovered earlier.
Nevertheless I suggest this error to be found and caught, and that a more relevant errormessage is displayed in 1.3?

Another possible reason is that I use mySQL4.1.1. I know that other similar software projects don't yet support this new mySQL version?

There could of course also be a setting in php, Apache, Coppermine or where ever , that I don't know about, being a php newbie?
I know Apache has a POST size setting, but I have left that unlimited.

regards
John

hyperion

Please note that there are two relevant settings in the Config console.  One is a maximum file size, the other is a maximum pixel size. 2048 is the default maximum pixels size limit.  

2272>2048  :)

If you have changed this value (rather than the 1024KB file size limit), check the config table in the database to make sure this value is updating.  Memory issues are very cleary marked as memory issues in the error messages.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

johnwr

And Voila, there it was. Thanks a lot. It was as easy as that. I really should have seen that one, but I got stuck on file/memory sizes.

Is then the difference between the filesize is too large, and the pixelsize is too large clearly marked in the errormessages as well? It might not be in the latest norwegian utf-8 translation (which is quite buggy anyway). I will see through it as soon as I get up to spec on PHP. (Or I probably wait for 1.3)

Thanks for all your help, and for developing such a great product.

John

hyperion

You can edit the Norwegian files in /lang to change anything you don't like.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)