raecosia / myroundcube

Automatically exported from code.google.com/p/myroundcube
0 stars 0 forks source link

[detach_attachments] - in some cases, the attachment is not attached to the message #690

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Token: 4c8bcf92cd572c56a6b2c0135ec220ea (Don't modify this token!)
Version: 2.3.24 (29-05-2014)
PHP: 5.3.3
RCMAIL: 1.0.1
Database: mysql
SERVER: Apache
----
I.  Issue Description: 

When sending attachment of a certain size, system remove the attachment from 
the message without notice.

II. Steps to reproduce the Issue:
1. Activate detach_attachments plugin
2. Settings: $config['cum_upload_default'] = 7;
3. Send message with one attachment (text file) with different size:

7340032 bytes (7.3 MB) - attachment dettached
6144000 bytes (6.1 MB) - attachment not included - why?
4096000 bytes (4.1 MB) - attachment not included - why?
3366912 bytes (3.4 MB) - attachment not included - why?
3268608 bytes (3.3 MB) - attachment not included - why?
3219456 bytes (3.2 MB) - attachment included
3145728 bytes (3.1 MB) - attachment included
3072000 bytes (3.1 MB) - attachment included

No error records in error log.

When I disable detach_attachments plugin, then the attachment is always sent, 
regardless of its size.

Original issue reported on code.google.com by on...@tachec.org on 29 May 2014 at 11:36

GoogleCodeExporter commented 8 years ago
I'm not able to duplicate the issue. Please post your test attachments anywhere.

Original comment by roland.l...@gmail.com on 29 May 2014 at 1:01

GoogleCodeExporter commented 8 years ago
Attachment is normal text file with random characters generated by dd (source 
/dev/urandom):

dd if=/dev/urandom of=test-3MB-1024.txt bs=1024k count=3
dd if=/dev/urandom of=test-3MB-1048.txt bs=1048k count=3
dd if=/dev/urandom of=test-5MB-1024.txt bs=1024k count=5

The first file (test-3MB-1024.txt) is normally sent, including attachment. 
The second file (test-3MB-1048.txt) is sent but without the attachment.

When I change config parametr cum_upload_default to 10, then second file 
(test-3MB-1048.txt) is normally sent, including attachment but third file 
(test-5MB-1024.txt) is sent but without the attachment.

This behavior makes me crazy, when I can not find an apparent cause or any 
mistake in settings.

Original comment by on...@tachec.org on 30 May 2014 at 6:25

GoogleCodeExporter commented 8 years ago
I'm coding on Windows. Please post test files (source or links to download).

Original comment by roland.l...@gmail.com on 30 May 2014 at 6:30

GoogleCodeExporter commented 8 years ago
http://www.tachec.org/test-3MB-1048.txt
http://www.tachec.org/test-3MB-1024.txt
http://www.tachec.org/test-5MB-1024.txt

Original comment by on...@tachec.org on 30 May 2014 at 6:41

GoogleCodeExporter commented 8 years ago
What do you mean when saying "not included". Do you mean not even the HTML 
placeholder attachment with the download link is sent?

Original comment by roland.l...@gmail.com on 30 May 2014 at 7:03

GoogleCodeExporter commented 8 years ago
Please also post your entire plugin configuration.

Original comment by roland.l...@gmail.com on 30 May 2014 at 7:11

GoogleCodeExporter commented 8 years ago
... and finally please also check if you get something like ...

PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted (tried to 
allocate 6990698 bytes) in ...

... in Roundcube's errors log.

Original comment by roland.l...@gmail.com on 30 May 2014 at 7:29

GoogleCodeExporter commented 8 years ago
When attachment is bigger then cum_upload_default configuration parameter then 
after uploading of this bigger file there is always HTML placeholder attachment 
with the download link. That's fine and it works correctly.

But when I set cum_upload_default = 7 and sent message with file 
test-5MB-1024.txt (size: 5MB), recipient of the message does not find any 
attachment and this is problem. This message in my Sent folder doesn't contain 
attachment.  

Original comment by on...@tachec.org on 30 May 2014 at 7:34

GoogleCodeExporter commented 8 years ago
Please read all comments and post things as required. Also please confirm that 
there are NO ERRORS in your logs. Finally check if MySQL (my.ini) has been 
adjusted (http://myroundcube.com/myroundcube-plugins/detach_attachments-plugin).

QUOTE:
"Check the MySQL server configuration. By default the max_allowed_packet is 1M 
in MySQL. You must increase this value to at least 4/3 of that in 
max_upload_size from the PHP configuration; for example, if the upload limit in 
PHP is 5M, then increase the max_allowed_packet value in MySQL to at least 7M."

Original comment by roland.l...@gmail.com on 30 May 2014 at 7:41

GoogleCodeExporter commented 8 years ago
php_value memory_limit 256M - no errors in Roundcube logs - this is what I 
search 
first.

my.cnf: max_allowed_packet = 27M

Original comment by on...@tachec.org on 30 May 2014 at 7:51

GoogleCodeExporter commented 8 years ago
<?php

$config['cum_upload_limit_resolution'] = 1;
$config['detach_attachments_client'] = false;

/* In order to disallow users to change the defaults add
   'cum_upload_detach' to the 'dont_override' array in
   config.inc.php. */
$config['cum_upload_default'] = 7;

/* download links expire after x days */
$config['dl_expires'] = 30;

?>

Original comment by on...@tachec.org on 30 May 2014 at 7:54

GoogleCodeExporter commented 8 years ago
Does your PHP installation handle such big uploads properly if you disable the 
plugin at all?

Original comment by roland.l...@gmail.com on 30 May 2014 at 7:56

GoogleCodeExporter commented 8 years ago
The default Roundcube .htaccess is shipped with the following settings ...

php_value   upload_max_filesize 5M
php_value   post_max_size       6M
php_value   memory_limit        64M

Did you overwrite these settings?

Original comment by roland.l...@gmail.com on 30 May 2014 at 8:09

GoogleCodeExporter commented 8 years ago
Yes, when I disable detach_attachments plugin, then the attachment (5MB, 7MB, 
...) is always sent.

Of course, I change default settings in .htaccess:

php_value       upload_max_filesize     20M
php_value       post_max_size           24M
php_value       memory_limit            256M

Original comment by on...@tachec.org on 30 May 2014 at 8:16

GoogleCodeExporter commented 8 years ago

Original comment by roland.l...@gmail.com on 2 Jun 2014 at 2:25