Author Topic: Attachment size problem  (Read 11202 times)

Offline Webalistic

  • Newbie
  • *
  • Posts: 9
Attachment size problem
« on: May 12, 2008, 11:21:56 AM »
Hiyall,
I'm posting this here because it appears thought the forums in different guises. Like lots of other members I've been thought the gamut of changes posted with little or no success.
Roundcube needs to be able to reliably send attachments bigger than 2MB if it is to be a success.
This is a truly excellent project, but this is a major issue that needs addressing fast before power users move on to something else.
Please, please can someone more talented than me fix this problem!

Offline Barbouille

  • Newbie
  • *
  • Posts: 5
Attachment size problem
« Reply #1 on: May 15, 2008, 08:10:52 PM »
I second this motion.

Offline Webalistic

  • Newbie
  • *
  • Posts: 9
Attachment size problem
« Reply #2 on: May 20, 2008, 09:09:06 AM »
Hey, let's bump this one guys

Offline CarstenS

  • Newbie
  • *
  • Posts: 1
Attachment size problem
« Reply #3 on: May 28, 2008, 12:37:12 PM »
If you have the problem, that the size of the attachments are all only 8K, I think here is a small solution.
change the file: ../program/lib/Mail/mime.php

change this line: $cont = fread($fd, $filesize);

to: while ($info = fread($fd,8192)) {
      $cont .= $info;
      }

it seams that this is the size of the apache buffer that makes the problem.

have a nice day

Offline davidcollantes

  • Newbie
  • *
  • Posts: 2
Seconding this
« Reply #4 on: May 29, 2008, 01:14:53 PM »
RC has a problem with attachments indeed. I am seconding this, please allow to set on configuration the size of attachments.

Offline crusher

  • Jr. Member
  • **
  • Posts: 24
    • http://crusher.untergrund.net
Attachment size problem
« Reply #5 on: June 14, 2008, 06:21:25 AM »
Quote from: CarstenS;12262
If you have the problem, that the size of the attachments are all only 8K, I think here is a small solution.
change the file: ../program/lib/Mail/mime.php

change this line: $cont = fread($fd, $filesize);

to: while ($info = fread($fd,8192)) {
      $cont .= $info;
      }

it seams that this is the size of the apache buffer that makes the problem.

have a nice day


Big Thx, CarstenS!
I had exactly this issue and your solution does fix it! :D
Now I still have to fix the problem with >2MB limit.

Let's hope that RC coders will fix all problems with attachments (as I go through the threads many ppl have problems with it) in future release.

For me RC is the best webmail solution and I would be sad to exchange it because of that attachment problems.

Offline freeman1doma

  • Newbie
  • *
  • Posts: 5
Attachment size problem
« Reply #6 on: June 24, 2008, 04:30:00 AM »
Quote from: crusher;12558
Big Thx, CarstenS!
Now I still have to fix the problem with >2MB limit.

Look at upload_max_filesize and post_max_size properties on php.ini file.

Offline Webalistic

  • Newbie
  • *
  • Posts: 9
Real fix required
« Reply #7 on: June 26, 2008, 10:20:22 AM »
Quote from: freeman1doma;12694
Look at upload_max_filesize and post_max_size properties on php.ini file.


With all respect to all the incredibly helpful forum members, the real issue is that RC has a bug when handling attachments that makes large files impossible to send. Dealing with the php.ini file (and .htaccess) will not solve that problem. It does, however, help users to eliminate this from their fault finding.
What we really need is a fix for the real problem.

Offline oleje

  • Newbie
  • *
  • Posts: 1
Roundcube email attachment size issue
« Reply #8 on: November 12, 2008, 05:35:22 PM »
Hello guys, I found the solution.

Except

upload_max_filesize and post_max_size

you need to set a memory_limit to something much higher than what you have in your roundcube .htaccess file:


Code: [Select]

<IfModule mod_php5.c>
  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 256M
  php_value session.auto_start 0
  php_value zlib.output_compression 0
  php_value magic_quotes_gpc 0
  php_value zend.ze1_compatibility_mode 0
</IfModule>


After applying these changes I was able to attach files and send email >25 megs in size.

Offline McTristan

  • Newbie
  • *
  • Posts: 3
Attachment size problem
« Reply #9 on: December 01, 2008, 12:51:15 AM »
Good for you. I still have issues with RoundCube while other software has not. It seems to be unable (at least most of the time) to process larger Attachments. In example I try to upload a file with exactly 11434567 bytes - sometimes it uploads all the bytes sometimes it forgets only a couple of bytes and just closes the attachment window without doing anything (btw. you can always check "failed" uploads in your upload temp directory specified in you php.ini file).
I've set all the appropiate settings in the PHP.ini file and sometimes it works - however not reliable so it most of the times rather useless.
This is with Windows Server 2008 - I do not get these kind of errors when using other scripts like galleries and stuff.