coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: claude258 on May 30, 2009, 11:51:47 PM

Title: Upload problem with big picture
Post by: claude258 on May 30, 2009, 11:51:47 PM
I am trying since a few days to get http (Coppermine) uploads of pictures bigger than 2MB possible (for members who dont know how to resize pictures before upload).

I asked me hosting company to make it possible. Hosting manager says he made this php setting:
memory_limit = 32M
upload_max_filesize = 32M

But it is not working. If I try to upload a picture of about 2.5MB (3600 X 2700) I get to a blank page. It is OK with pictures of about 1.5 MB (2200 X 1700).

Hosting company are looking at the problem. But you may be better for that.

Link to my gallery: www.claudebriere.net (http://www.claudebriere.net)
Debug mode enable.
Config setting: max upload: 4MB, Max pixel: 4000.
Upload enable for visitors.

I have read the doc but I dont know the problem.

Thanks for your help.
Title: Re: Upload problem with big picture
Post by: Joachim Müller on May 31, 2009, 12:25:48 AM
Upgrade first, you're running cpg1.4.18. Then re-calculate according to http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#ErrorAllowedMemorySize :
3600 x 2700 x 3 / 1048576 = 28 MB. Add the memory consumption for the script itself, the variables and arrays and you're easily over your current limit.
Title: Re: Upload problem with big picture
Post by: claude258 on May 31, 2009, 01:43:06 AM
Ok thanks! I think high resolution pictures are not allowed then.

Can we do a back-calculation? If I have the following php settings on the server, what do you suggest as max file size and max resolution in Coppermine config?
memory_limit = 32M
upload_max_filesize = 32M


Title: Re: Upload problem with big picture
Post by: Joachim Müller on May 31, 2009, 02:14:12 AM
I already told you where you can find the calculation scheme:
Quote from: Joachim Müller on May 31, 2009, 12:25:48 AM
Then re-calculate according to http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#ErrorAllowedMemorySize
Title: Re: Upload problem with big picture
Post by: claude258 on May 31, 2009, 02:27:40 AM
Quote from: Joachim Müller on May 31, 2009, 12:25:48 AM
Then re-calculate according to http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#ErrorAllowedMemorySize :
3600 x 2700 x 3 / 1048576 = 28 MB. Add the memory consumption for the script itself, the variables and arrays and you're easily over your current limit.

If I do the calculation - 3600 x 2700 x 3 / 1048576 = 28 MB
then my php memory_limit = 32M should be enough but as you said we need to add the memory consumption for the script itself, the variables and arrays. How much do I need to add? How can I estimate that? This is unknown for me.






Title: Re: Upload problem with big picture
Post by: Joachim Müller on May 31, 2009, 12:35:26 PM
Try http://www.php.net/manual/en/function.memory-get-usage.php and add that to your script to find out.