Roundcube Community Forum

 

Today my RoundCube suddenly undeliverable attachments

Started by ngmdat, June 30, 2015, 05:05:55 AM

Previous topic - Next topic

ngmdat

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.

SKaero


ngmdat

Hi SKaero,

Thanks for your advice,
I confirmed then i saw "tempname" of uploaded files was created, but them size = 0.

Regards,
NgMDat

SKaero

Does it work if you disable the redundant_attachments plugin?

ngmdat

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.

SKaero

Are there any errors in the web server log? Do you a space quota that has been exceeded?

ngmdat

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.

ngmdat

Hi everyone

I still not resolve this issue yet,
thanks for any idea ?

Regards,
NgMDat.

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;
    }

SKaero

It should do that since at that point the attachment should be cached in the database.

ngmdat

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.



SKaero

Do you have both the redundant_attachments and database_attachments plugins enabled?

ngmdat

Yes, with default configuration, i have both of them enabled..

SKaero

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.

ngmdat

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.