Question
I've been attaching files to topics with no obvious errors, they appear in the attachment list with the correct size and date etc. However, when I try to open them, I don't get anything.
It turns out that the directory in
pub exists and has the file in it, but its size is zero.
In the apache error, there is the following
[Sat Feb 09 23:44:13 2008] [error] [client 127.0.0.1] binmode() on closed filehandle fh00001dishpan.png at, referer: http://localhost/twiki/bin/attach/Sandbox/TestTopic5
[Sat Feb 09 23:44:13 2008] [error] [client 127.0.0.1] \t/var/www/html/twiki/lib/TWiki/Store.pm line 976 (#1), referer: http://localhost/twiki/bin/attach/Sandbox/TestTopic5
[Sat Feb 09 23:44:13 2008] [error] [client 127.0.0.1] (W unopened) You tried binmode() on a filehandle that was never opened., referer: http://localhost/twiki/bin/attach/Sandbox/TestTopic5
[Sat Feb 09 23:44:13 2008] [error] [client 127.0.0.1] Check you control flow and number of arguments., referer: http://localhost/twiki/bin/attach/Sandbox/TestTopic5
[Sat Feb 09 23:44:13 2008] [error] [client 127.0.0.1] , referer: http://localhost/twiki/bin/attach/Sandbox/TestTopic5
[Sat Feb 09 23:44:13 2008] [error] [client 127.0.0.1] read() on closed filehandle fh00001dishpan.png at, referer: http://localhost/twiki/bin/attach/Sandbox/TestTopic5
[Sat Feb 09 23:44:13 2008] [error] [client 127.0.0.1] \t/var/www/html/twiki/lib/TWiki/Store/RcsFile.pm line 730 (#2), referer: http://localhost/twiki/bin/attach/Sandbox/TestTopic5
[Sat Feb 09 23:44:13 2008] [error] [client 127.0.0.1] (W closed) You tried to read from a closed filehandle., referer: http://localhost/twiki/bin/attach/Sandbox/TestTopic5
[Sat Feb 09 23:44:13 2008] [error] [client 127.0.0.1] , referer: http://localhost/twiki/bin/attach/Sandbox/TestTopic5
I've no idea where to start looking. There is no other error, the attachment is listed correctly in the attachment table, and the file permissions in the pub directory look correct.
This started to happen after an update to 4.2, it was working with 4.1. All uploads of new attachments are affected (attachments from before the update are still there).
Environment
--
StephanMatthiesen - 10 Feb 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
This is a known issue that unfortunately slipped into the 4.2 release;
TWikibug:Item4611
,
TWikibug:Item5265
,
TWikibug:Item5307
. Only workaround at this time is to downgrade to 4.1.2 or to disable the plugins that use the
beforeAttachmentSaveHandler.
--
PeterThoeny - 10 Feb 2008
Thanks Peter, that's helpful. After disabling the relevant plugins it works. Should have searched the bugs database more intensely.
--
StephanMatthiesen - 10 Feb 2008
It is always good to check the known issues first,
KnownIssuesOfTWiki04x02.
--
PeterThoeny - 11 Feb 2008