X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/eb4a6fb01a5c3a61c10bb7222d718c9bb7ce2bd3..5ccd0cb518f663872c93dc376f756bf71996034d:/doc/bugs/attachment:_failed_to_get_filehandle.mdwn diff --git a/doc/bugs/attachment:_failed_to_get_filehandle.mdwn b/doc/bugs/attachment:_failed_to_get_filehandle.mdwn index 3ce7e62ac..e5d4756fc 100644 --- a/doc/bugs/attachment:_failed_to_get_filehandle.mdwn +++ b/doc/bugs/attachment:_failed_to_get_filehandle.mdwn @@ -4,20 +4,65 @@ the error message like below: Błąd: failed to get filehandle +> Can you do some debugging? If you edit attachment.pm line 136, to print +> out what it did get, and show me what that yields, maybe I can figure +> this out. + + error("failed to get filehandle ($fh)"); + +>> Sure. I've done the change and it seems that $fh variable is undefined: + +>> Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/IkiWiki/Plugin/attachment.pm line 135. +>> failed to get filehandle () + +> Also, what web server and version of perl is this? --[[Joey]] + +>> It's Apache2 2.2.8-1ubuntu0.3 and Perl 5.8.8-12 from Ubuntu Hardy. --[[Paweł|ptecza]] + +>>> Hmm, is your CGI.pm perhaps creating the attachment temp file, but +>>> not providing an open filehandle to it via the `upload` method? +>>> Change the debugging line to this: --[[Joey]] + + error("failed to get filehandle:$fh ; file:$filename ; is ref:".ref($q->param('attachment'))); + +>>>> Now my Ikiwiki returns: + +>>>> failed to get filehandle: ; file:sandbox/test.txt ; is ref: + +>>>> Is it helpful for you? --[[Paweł|ptecza]] + +>>>>> Yes, this suggests that CGI.pm's `upload` function is not working, +>>>>> but that it *is* returning a filehandle pointing at the attachment +>>>>> using the old method. Hmm, so I'll bet you have a CGI.pm version +>>>>> older than 2.47. Can you find your system's CGI.pm and grep for +>>>>> "VERSION" in it to determine the version? I checked debian stable. +>>>>> and its perl 5.8.8 has version 3.15, so is not affected, I think. + +>>>>>> I have CGI.pm 3.15 too: + +>>>>>> $ grep VERSION= /usr/share/perl/5.8.8/CGI.pm +>>>>>> $CGI::VERSION='3.15'; + +>>>>> I've just checked in a fix that should work, can you test it? +>>>>> [diff](http://git.ikiwiki.info/?p=ikiwiki;a=commitdiff;h=71f10579c00a8ddc20ada1a1efd33aac25a3da7e) --[[Joey]] + +>>>>>> I've patched `attachment.pm` module, but the bug still occurs. +>>>>>> However I can see a little progress. I changed invoking `error()` +>>>>>> subroutine like you showed me before and now Ikiwiki prints + +>>>>>> failed to get filehandle:test.txt ; file:sandbox/test.txt ; is ref: + +>>>>>> --[[Paweł|ptecza]] + The same message I can see in the Apache log file. There is also following warning: Use of uninitialized value in length at /usr/share/perl5/IkiWiki/Plugin/attachment.pm line 36. -Is it Ikiwiki bug or my attachment plugin is misconfigured? --[[Paweł|ptecza]] +> This is unrelated, I've fixed the warning message. --[[Joey]] -> Joey, please fix the colon in page name of my report. Ikiwiki sets -> "attachment:\_failed\_to\_get\_filehandle/" URL on "Bugs" page and -> the report is not clickable in my Epiphany browser: +Is it Ikiwiki bug or my attachment plugin is misconfigured? --[[Paweł|ptecza]] -> Firefox doesn't know how to open this address, because the protocol -> (attachment) isn't associated with any program. +> Joey, please fix the colon in page name of my report. [...] -> I can only edit it :) Bad handling ':' character by Ikiwiki is probably -> its another bug. -> --[[Paweł|ptecza]] +>> Moved to [[colon:problem]] --[[Joey]]