Author Topic: [SOLVED] Can't upload attachments over 121kb  (Read 5180 times)

Offline transmobius

  • Newbie
  • *
  • Posts: 4
[SOLVED] Can't upload attachments over 121kb
« on: September 12, 2012, 11:21:21 AM »
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?
« Last Edit: September 14, 2012, 10:24:38 PM by transmobius »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,898
    • SKaero - Custom Roundcube development
Re: Can't upload attachments over 121kb
« Reply #1 on: September 13, 2012, 07:14:54 AM »
Do any error show up anywhere?

Offline transmobius

  • Newbie
  • *
  • Posts: 4
Re: Can't upload attachments over 121kb
« Reply #2 on: September 13, 2012, 05:01:29 PM »
No, none that I've found anyway.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,898
    • SKaero - Custom Roundcube development
Re: Can't upload attachments over 121kb
« Reply #3 on: September 13, 2012, 05:12:10 PM »
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?

Offline transmobius

  • Newbie
  • *
  • Posts: 4
Re: Can't upload attachments over 121kb
« Reply #4 on: September 13, 2012, 06:51:12 PM »
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 . . .

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,898
    • SKaero - Custom Roundcube development
Re: Can't upload attachments over 121kb
« Reply #5 on: September 14, 2012, 05:10:57 PM »
That error should be reported somewhere, that would have the information needed to figure out the problem.

Offline transmobius

  • Newbie
  • *
  • Posts: 4
Re: Can't upload attachments over 121kb
« Reply #6 on: September 14, 2012, 10:23:47 PM »
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