Roundcube Community Forum

 

[SOLVED] Can't upload attachments over 121kb

Started by transmobius, September 12, 2012, 11:21:21 AM

Previous topic - Next topic

transmobius

We are running Roundcube v0.8.1 under Debian 6.0/Squeeze with PHP v5.3.3 and Apache v2.2.16.

Any file, of any type, over 121kb can not be uploaded as an attachment.  Anything smaller uploads immediately.  Have tried under 2 different versions of Firefox and 2 of IE.  Anything larger just spins saying 'Uploading file...' and never completes.  The tiny files do end up in the proper temp directory and can be sent.

Attachment variables are upload_max_filesize = 12M, post_max_size = 15M, memory_limit = 256M (in both php.ini and .htaccess).  The attachment window does say that the max allowed size is 12MB.

This is a recent problem noticed on v0.8.1 on a long standing install that has been upgraded in place over many versions of Roundcube.

Anyone have any ideas?

SKaero


transmobius


SKaero

So no errors in the RoundCube error log (make sure the logs folder is writable) and nothing in the web server error logs and noting showing up in the bowsers JS console?

transmobius

Log directory is writable and contain a few non-related entries. 

Apache log (loglevel=debug) yields:
Deprecated:  Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0
Deprecated:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
[Thu Sep 13 15:42:40 2012] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 0 in child 15146 for worker proxy:reverse
[Thu Sep 13 15:42:40 2012] [debug] proxy_util.c(1837): proxy: worker proxy:reverse already initialized
[Thu Sep 13 15:42:40 2012] [debug] proxy_util.c(1934): proxy: initialized single connection worker 0 in child 15146 for (*)


Firefox Web Console DOES report something!
[15:42:30.452] POST https://XXXX/mail/?_task=mail&_id=66199550050525ffd73d1c&_uploadid=1347576150154&_action=upload [HTTP/1.1 500 Internal Server Error 1498ms]

So, we're getting a 500 Internal Server Error, but no detail in the Apache logs . . .

SKaero

That error should be reported somewhere, that would have the information needed to figure out the problem.

transmobius

Spoke too soon, this particular sub-domain has separate error log!  Here is what an 136KB attachment causes:

mod_fcgid: HTTP request length 138109 (so far) exceeds MaxRequestLen (131072), referer: https://XXXXX/mail/?_task=mail&_id=17869668305053d9fc8b7a9&_action=compose

So, we need to edit /etc/apache2/mods-available/fcgid.conf and add (for 12MB attachments)
FcgidMaxRequestLen 12288000

Tested and working.  Thanks for walking me through it SKaero, sometimes I really need a sounding board.

For anyone else that wants the reference doco, see:
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
especially the section http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidmaxrequestlen