Roundcube Community Forum

Release Support => Older Versions => Release Candidate 2 => Topic started by: hviid on December 16, 2007, 10:58:06 AM

Title: Attachment size limit?
Post by: hviid on December 16, 2007, 10:58:06 AM
Hi how do I increase the max attachment size?
I get an error when uploading an attachment: "The upload exceeds the max of 2.0M"

Where can i change this?
I found something at the FAQ, but I can't get it to work, I pasted it in the .htaccess file, cause I can't find the one referred to.

Regards Martin
Title: Re: Attachment size limit?
Post by: chinaman on December 22, 2007, 10:30:44 PM
Hi Martin,

which system are your running?

I think you need to change this in your PHP settings. ( I did it in the php.ini file )
Just take care that you might also need to increase the maximum memory size which php is allowed to use bcs. there is a bug in roundcube using a lot of memory when sending large attachments (128 MB for 20MB attachment!)

Hope that might help you.
Regards Thomas
Title: Re: Attachment size limit?
Post by: mr-morris on March 18, 2008, 08:55:29 AM
Look at this topic:

http://roundcubeforum.net/forum/index.php?topic=2817.0 (http://roundcubeforum.net/forum/index.php?topic=2817.0)
Title: Attachment limit max to 2MB only.
Post by: reynan on May 02, 2008, 07:32:04 AM
Hello,

I just can't find this link :(

http://roundcubeforum.net/forum/index.php?topic=2817.0

I also get an error upon uploading large files.

"The upload exceeds the max of 2.0M"

anyone on how to resolve this?

thanks,

--reynan
Title: Attachment size limit?
Post by: climaxy on May 02, 2008, 08:37:39 AM
Hi,

You've to change the php parameters "upload_max_filesize" & "post_max_size" either in your global php.ini or within the .htaccess file in the roundcoube directory.

Whatever you change the "upload_max_filesize" to, the "post_max_size" should be at least 1M higher.

Hope that helps.

br
climaxy
Title: Email hanging up on 12MB attachment
Post by: tsapusek on May 02, 2008, 10:28:05 AM
Hi,

I'm having a similar problem with large attachments.  When I send the message it just sits there saying "Sending Message Now" and never sends - I don't receive an error anything.

I've changed the .htaccess file to this:


  php_flag   display_errors   Off
  php_flag   log_errors   On
  php_value   error_log   logs/errors
  php_value   upload_max_filesize   30M
  php_value   post_max_size   30M
  php_value   memory_limit   128M
  php_value   session.auto_start   0
  php_value   zlib.output_compression   0
  php_value   magic_quotes_gpc   0



  php_flag   display_errors   Off
  php_flag   log_errors   On
  php_value   error_log   logs/errors
  php_value   upload_max_filesize   30M
  php_value   post_max_size   30M
  php_value   memory_limit   128M
  php_value   session.auto_start   0
  php_value   zlib.output_compression   0
  php_value   magic_quotes_gpc   0


And I've also changed the php.ini to those same values for upload_max_filesize, post_mas_size and memory_limit.

Is there anything else that I should change?

Thanks for your help.
Title: Attachment size limit?
Post by: climaxy on May 02, 2008, 03:19:50 PM
Quote from: tsapusek;11787
Hi,

I'm having a similar problem with large attachments.  When I send the message it just sits there saying "Sending Message Now" and never sends - I don't receive an error anything.

I've changed the .htaccess file to this:


  php_flag   display_errors   Off
  php_flag   log_errors   On
  php_value   error_log   logs/errors
  php_value   upload_max_filesize   30M
  php_value   post_max_size   30M
  php_value   memory_limit   128M
  php_value   session.auto_start   0
  php_value   zlib.output_compression   0
  php_value   magic_quotes_gpc   0



  php_flag   display_errors   Off
  php_flag   log_errors   On
  php_value   error_log   logs/errors
  php_value   upload_max_filesize   30M
  php_value   post_max_size   30M
  php_value   memory_limit   128M
  php_value   session.auto_start   0
  php_value   zlib.output_compression   0
  php_value   magic_quotes_gpc   0


And I've also changed the php.ini to those same values for upload_max_filesize, post_mas_size and memory_limit.

Is there anything else that I should change?

Thanks for your help.


Just an assumption, which is not related to roundcube: Eventually the message size limit from your MTA is restricted. Standard  message sizes for MTAs are limited to 10 MB! So maybe you should check also this setting.

br
climaxy
Title: Attachment size limit?
Post by: shaveht on May 02, 2008, 06:33:43 PM
Try to change upload limit in your .htaccess file in homedir installation
Title: Attachment size limit?
Post by: netcrab on May 05, 2008, 09:37:40 PM
Quote from: climaxy;11774
Hi,

You've to change the php parameters "upload_max_filesize" & "post_max_size" either in your global php.ini or within the .htaccess file in the roundcoube directory.

Whatever you change the "upload_max_filesize" to, the "post_max_size" should be at least 1M higher.

Hope that helps.

br
climaxy


I did it like above, but not work.   : (
Title: Same attachment problem throughout the forum
Post by: Webalistic on May 20, 2008, 09:36:30 AM
If you search the forums you will find this issue again and again with various solutions suggested, none of which are that successful.

This is a great application, but people nowadays need to send ever bigger attachments.  Please lets get this sorted before the power users move on to another program and the development stalls.

Isn't there anyone with more talent than me who can fix this? Please!
Title: Attachment size limit?
Post by: othello on May 21, 2008, 05:35:04 AM
Quote from: Webalistic;12138
If you search the forums you will find this issue again and again with various solutions suggested, none of which are that successful.

This is a great application, but people nowadays need to send ever bigger attachments.  Please lets get this sorted before the power users move on to another program and the development stalls.

Isn't there anyone with more talent than me who can fix this? Please!


I think this is not related to RC. I also have this kind of problem before, change the post_max_size and upload_max_filesize in php.ini, the 2M barrier gone but still have the problem for attachment with 8M attachment. Increasing the message size limit in my MTA (I use Postfix) the problem solved.

HTH
Title: Sorry to disagree
Post by: Webalistic on May 21, 2008, 11:23:35 AM
Sorry to disagree, but we use other IMAP webmail software (Felamimail and Zimbra to name but two) on the same accounts without experiencing these problems with email attachment sizes.

I'm not saying RC is the only one with this problem, but to be a real contender it needs to get sorted. Otherwise it will just get pushed aside.
Title: Attachment size limit?
Post by: bpat1434 on May 22, 2008, 01:40:14 AM
I have to politely agree and disagree.

RoundCube has some issues with memory and attachments; however, not all of this is RoundCube's fault.  Many PHP setups are "vanilla" and limit post to 2M and memory to 32M.  Downloading large attachments can spiral out of control (a RC bug most likely).  Uploading attachments have about 3 different limits to check through including the post upload limit, the HTML form max upload limit, and the memory limit.  So while RC may have issues with uploads, it's not always RoundCube's fault.  There are limits to sizes of sending mail, and while your limits may be high (or non-existant) not everyone has control over those limits (read: shared hosting customers).  So while you may not experience them on your servers with other clients, it's not definitively a RoundCube issue because many factors contribute to attachment sending issues.  Although, it does look like RoundCube could have an issue of attachment handling in general.

That is all not to mention that 0.1rc2 is a rather old release.  There may have been some improvements to attachment handling.

Perhaps there's a good hack in the midst of the future which can get the max_upload_size and max_post_size and the max size of attachments for the SMTP server and show the smallest one in the attachment pane.  Something like:

[ Attachment Limits: 0.4/2 MB ]

Then users will know what their limit is per whatever their server is.  Question is, what SMTP servers advertise what their limit is when queried (like the IMAP CAPABILITIES response).
Title: Couldn't agree more
Post by: Webalistic on May 22, 2008, 12:11:42 PM
This is quite correct.

For us, when we are evaluating different webmail software we run it on the same server and use it with the same SMTP accounts. And we understand the importance of the .htaccess files and php settings. So for us the irritation is the RC bug which spirals memory usage out of control with large attachments. For serious deployment this makes RC unusable, which is a great shame for it is otherwise a great project.

My gut feel is that this is a serious bug that needs addressing once and for all, as people like us evaluating the software for large scale use have only got so much time to test these things before we have to move on.
Title: Attachment size limit?
Post by: bpat1434 on May 22, 2008, 03:37:08 PM
This is true.  I have a feeling it has something to do with how the attachments are handled.  I'm not sure what the best avenue would be:  Download the attachments for the user, or leave them until requested by the user.  Not sure what's better, and what's easiest to implement.  But I agree, with you.  And at least you can tell us that you have tested the same accounts on the same servers.  That's the big ticket thing.
Title: Attachment size limit?
Post by: merlynx on June 18, 2008, 07:22:56 AM
I received the maximum upload of 2m exceeded error and googled it and it landed me here.

Maybe I missed something - but I made the standard changes to the vanilla install for config files, and the error went away...

a) edited /etc/httpd/conf.d/roundcube.conf
...
php_value       upload_max_filesize     12M #default is 2M
...

b) edited /etc/php.ini
...
; Maximum size of POST data that PHP will accept.
post_max_size = 12M #default is 8M
...
; Maximum allowed size for uploaded files.
upload_max_filesize = 12M #default is 2M

Running
  centOS 5.1 x86_64
  apache2, php 5, mysql etc.

I don't think this plays into this - but I am using imapproxy for roundcube - which makes the application a lot more "peppy."
(http://imapproxy.org)

As far as "spiraling out of control..." - is there a measurable threshold?  Like say 8-12M or something?  As up to 3MB its been smooth sailing for me so far.  I'll try some larger files - I wonder if postfix/sendmail MTAs have anything to do with the stability of the product?

Food for thought.
Title: Attachment size limit?
Post by: tct on May 26, 2011, 02:28:30 AM
Quote from: merlynx;12632
I received the maximum upload of 2m exceeded error and googled it and it landed me here.

Maybe I missed something - but I made the standard changes to the vanilla install for config files, and the error went away...

a) edited /etc/httpd/conf.d/roundcube.conf

b) edited /etc/php.ini

You forgot about local .htaccess in rouncube directory.