coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 PHPnuke/Postnuke Support => Topic started by: klaus1 on November 12, 2003, 10:37:15 AM

Title: [EXPLAINED] Error again(only by uploading high pixel pics)
Post by: klaus1 on November 12, 2003, 10:37:15 AM
Hello,Klaus in Berlin still need your help

Problem describe
........................
 
When uploading high pixel pics I got the following warning.


Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 1600 bytes) in /home/virtual/site140/fst/var/www/html/modules/coppermine/include/picmgmt.inc.php on line 195

I have oppened debug module and have found these info,hopfully could be useful.
...........................


Size and Time
Directive Local Value Master Value
max_execution_time 60 60
max_input_time 60 60
upload_max_filesize 2M 2M
post_max_size 8M 8M


Is this depend on my server? Or I ought to change some code again?
Look forwarding for your help,thanks!
Title: [EXPLAINED] Error again(only by uploading high pixel pics)
Post by: gtroll on November 12, 2003, 10:42:32 AM
You actually answered your own question here, your server(from debug) has a limit of post_max_size 8M and your pic is bigger than that. why would you want to have a pic this big for onscreen display anyway? it would probably take five minutes till I saw it on my 56k? connection
Title: [EXPLAINED] Error again(only by uploading high pixel pics)
Post by: klaus1 on November 12, 2003, 10:55:48 AM
The file is only about 100K,but the pixel is high...(from a 2 megabyte photo)
Nowadays the popular type of digital camera has often 3 megabyte pixel.
Most users are usually too lazy to use software to minimize the pixel of the pics.
Really no rescue methode this time?


Otherwise I can find the uploaded pic with ftp programm,but it can not be displayed in the forum.
It seems that the server is still allowed to upload such file... :?:  :roll:
Title: [EXPLAINED] Error again(only by uploading high pixel pics)
Post by: gtroll on November 12, 2003, 11:13:44 AM
8M is your limit but the server chokes on 100K? Change the setting in config of  Max size for uploaded pictures (KB) to 2048
Title: [EXPLAINED] Error again(only by uploading high pixel pics)
Post by: klaus1 on November 12, 2003, 11:42:41 AM
no use,I suspect the problem is cause too high pixel.
I can upload the same pic which with low pixel(it means low quality,but 400 k big) without any problem.
But if I just cut one corner from the high pixel file(even only 144k,better quality and small size) then I would have met the problem.


*with some image edit software we can change the both quality and size of the pictures
So many users of mine have met the same problem,only a 200k pic from a high pixel photo cannot be upload.
Title: [EXPLAINED] Error again(only by uploading high pixel pics)
Post by: DJMaze on November 12, 2003, 11:57:44 AM
The file decompressed by the GD library and it will work in truecolor with it.

So how much memory uses your image without compression in truecolor ?
Title: [EXPLAINED] Error again(only by uploading high pixel pics)
Post by: klaus1 on November 12, 2003, 06:16:17 PM
what do you  mean?
From where can I read that date?
What can I still do?
Title: [EXPLAINED] Error again(only by uploading high pixel pics)
Post by: klaus1 on November 12, 2003, 07:24:49 PM
Can I change the post_max_size setting somewhere in the programm :?:
Title: [EXPLAINED] Error again(only by uploading high pixel pics)
Post by: DJMaze on November 12, 2003, 07:28:15 PM
No you can't this limit is set in php.ini ask your provider for more memoryin php
Title: [EXPLAINED] Error again(only by uploading high pixel pics)
Post by: Shorty on November 27, 2003, 12:37:36 PM
I got the exact same problem!!

Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 5120 bytes) in /home/virtual/site36/fst/var/www/html/modules/coppermine/include/picmgmt.inc.php on line 202

Directive Local Value Master Value
max_execution_time 30 30
max_input_time 60 60
upload_max_filesize 2M 2M
post_max_size 8M 8M

The size of pic i try to upload:
202Kb    1280x960
Title: [EXPLAINED] Error again(only by uploading high pixel pics)
Post by: Shorty on November 27, 2003, 12:39:38 PM
somehow the post came twice  :lol:
Title: [EXPLAINED] Error again(only by uploading high pixel pics)
Post by: DJMaze on November 28, 2003, 03:07:46 AM
Let me explain (again) a compressed file (jpg/png) is decompressed by the GD library which causes a file that's far much bigger because every pixel is converted to a 32bit truecolor.

So when you use a large compressed picture, decompressed it will be damn big in PHP.

So for example in your paint app:
- set JPG compression to 0% and save the file. How big is it ?
- save the file in truecolor as BMP. How big is it ?

there are your answers :D