Fixed Mini-bug: Attachments do not work on NFS

Rigel Kentaurus

Well-known member
This week I was pimping up my setup a little (since, again, I have exceeded my traffic expectations), and I am now writing all the attachments to a drive shared through NFS, which allows me to do some cluster balancing over the requests while still sharing the data.

However, the attachments do not work because they use rename(), and rename() does not like two physical drives (as in /tmp and an NFS mount)

I applied a mini-patch on DataWriter/Attachment.php

instead of

Code:
            $success = rename($source, $destination);

I am now using

Code:
            $success = copy($source, $destination);
            @unlink($source);

And attachments are now back in service
 
Top Bottom