Fatal error when uploading pics (Flash-Uploader) Fatal error when uploading pics (Flash-Uploader)
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Fatal error when uploading pics (Flash-Uploader)

Started by pictureproject.me.ly, December 20, 2015, 12:21:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pictureproject.me.ly

Hi guys,

since some hours, I have big problems with uploading photos.
After selecting and uploading, I receive following error:

Fatal error:  Out of memory (allocated 3932160) (tried to allocate 786432 bytes) in /home/www/galerie/lang/german.php on line 2361

How can I fix that issue?

gmc

How large are the photos you are uploading? 
You are exceeding the memory limit set by your ISP. This is not a Coppermine limitation.
You can ask them to increase the limit (can be specified in php.ini if your host allows) - or you can reduce the size of the images you are uploading...

My camera takes 20+MP images - I always downsize to a more reasonable size before uploading (and CPG builds the intermediate and thumb images).
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

allvip


ron4mac

Also, you can check for the value of user_ini.filename in your phpinfo. If set, it will likely most often be .user.ini .
If you create a file by the configured name in the root of your CPG install, you can set php.ini type items there.
Example:

.user.ini
[php]
upload_max_filesize = 200M
post_max_size = 200M

max_execution_time = 300
memory_limit = 256M

pictureproject.me.ly

Sorry for the late reply quys.



user_ini.filename .user.ini

upload_max_filesize 1024M
post_max_size 1024M

max_execution_time 30
memory_limit 512M[b]*[/b]


Do you think I should rise the "max_execution_time" up to your suggested value of "300"?


*
I checked that problem also with my hoster.
On the gallery server, I'm also running a cloud software - maybe both togehter consumed too much memory?
Maybe the error occured because of reaching the RAM limit.
Now I upgraded my server RAM to 512MB.
Do you think this already will solve the problem for the future?


The file size limit I already changed right after installing CPG for the first time - that was in 2011 I think.

Greez.


gmc

hmmm... after a little more searching I would go back to your hoster...

You are getting an 'Out of Memory' message and not the more typical 'Allowed memory size of X bytes exhausted'...
Some quick searching (Google Is Your Friend - GIYF) - two possibilities seem to be an Apache level memory limit or physical memory.

Apache level:
http://stackoverflow.com/questions/13955914/php-out-of-memory-error-even-though-memory-limit-not-reached
Look for RLimitMEM in http.config (apache conf file) - I'm thinking this is more likely.
Either an unreasonably low limit - or you are running too many other parallel processes.

System level:
http://stackoverflow.com/questions/8808125/random-php-fatal-error-out-of-memory-errors
Look at Apache's error log for errors/crashes - as it wouldn't have survived the encounter:
'zend_mm_heap corrupted' as an example.
Virtual servers should have sufficient virtual memory to handle far more requests that the physical memory on the machine - especially in a shared hosting environment... though wouldn't surprise me with some of the hosts I have run into.

You didn't say how large the photos are - but looking at the bytes allocated and requested - they aren't that large...
"(allocated 3932160) (tried to allocate 786432 bytes)" - only 3.9M allocated - and only requesting 786K (0.786M)
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

ron4mac

Try using the HTML5Uploader Plugin.
It can be set in its configuration (by groups) to upload files larger than what your server normally allows by 'chunking' the upload.
Rename your .user.ini file so it is not effective, install the HTML5Upload plugin and set the plugin's upload size to something large. Try to upload a large file and see what happens.

pictureproject.me.ly

Sorry again for the late reply.

Due to further errors with other software, I upgraded to 512MB RAM.
Since the upgrade I never got this error again.
Meanwhile, I installed the HTML5-Uploader.

Many thanks for your great supporting.

phill104

Excellent stuff. For reference as to just how much memory can be used by even small images check out this old but still good post - http://forum.coppermine-gallery.net/index.php/topic,24088.0.html
It is a mistake to think you can solve any major problems just with potatoes.