Hi Everyone,
Today my RoundCube suddenly undeliverable attachments.
when I upload to send an error occurred in <$ RoundCube> / logs / errors:
file_get_contents(): Filename cannot be empty in /var/www/roundcubemail-1.1.2/plugins/redundant_attachments/redundant_attachments.php on line 104.
Thanks for any advices.
Regards,
NgMDat.
Make sure your temp directories are writable.
Hi SKaero,
Thanks for your advice,
I confirmed then i saw "tempname" of uploaded files was created, but them size = 0.
Regards,
NgMDat
Does it work if you disable the redundant_attachments plugin?
After disable the 'redundant_attachments' plugin
it didn't work (create size=0 file)
and roundcube client display error dialog with following message:
[File upload failed.]
Regards,
NgMDat.
Are there any errors in the web server log? Do you a space quota that has been exceeded?
Thanks for your response.
There are no error in web-server log and have a lot of disk space for my centos box.
After executing "yum update" I think that something affected to roundcube but i don't know what and where.
Regards,
NgMDat.
Hi everyone
I still not resolve this issue yet,
thanks for any idea ?
Regards,
NgMDat.
Hi Everyone,
After tracing roundcube upload process, i know that following code was reason of issue.
It take a lot time to find out.
Is it bug or special function ?
<$ROUNDCUBE>/plugins/database_attachments/database_attachments.php
/**
* Save a newly uploaded attachment
*/
function upload($args)
{
$args['status'] = false;
...
if ($status) {
$args['id'] = $key;
$args['status'] = true;
$args['path'] = null; <---- it clear the path of temp file uploaded from client.
}
return $args;
}
It should do that since at that point the attachment should be cached in the database.
Hi SKaero,
Thanks for your comment.
If I disable that line, roundcube will send mail with attachments as expected.
...
if ($status) {
$args['id'] = $key;
$args['status'] = true;
// $args['path'] = null; <---- disable this line.
}
...
Something's wrong with that way to resolve this issue, isn't it ?
Regards,
NgMDat.
Do you have both the redundant_attachments and database_attachments plugins enabled?
Yes, with default configuration, i have both of them enabled..
I think that maybe your problem, redundant_attachments stores in both the file system and the database, database_attachments just stores in the database. If database_attachments has already handled the attachment then its not available for the redundant_attachments plugin.
Thanks for your advice,
when i disable database_attachments plugin, roundcube work fine.
I like to close this issue.
Thanks your time and dedication.
Regards,
NgMDat.