Question
When I try to attach any files to a topic I get the following software error message and the file is not uploaded at all: "CGI.pm: Server closed socket during multipart read (client aborted?)."
Could anybody help?
- TWiki version: TWiki 01 Feb 2003
- Perl version: 5.8.0-2 (Cygwin)
- Web server & version: Apache/1.3.27 (Win32)
- Server OS: W2K
- Web browser & version: Microsoft Internet Explorer 6.0
- Client OS: W2K
- CGI (2.81)
- CGI::Carp (1.23)
- File::Copy (2.05)
- Digest::SHA1 (2.02)
- MIME::Base64 (2.18)
- Net::SMTP (2.24)
- Algorithm::Diff (1.01)
- MIME::Base64 (2.18)
- POSIX (1.05)
Thanks a lot
Boris
--
BorisWaldis - 30 Apr 2003
Answer
Possibly a bug in CGI.pm? See related
AttachingFilesFails and
AttachFailureAgain. Search also
Google:CGI+%22Server+closed+socket+during+multipart+read%22
--
PeterThoeny - 30 Apr 2003
Using CYGWIN(1.32)/Apache(1.3.24-5)/Perl(5.8.0-2) too and had this problem - I've replaced the CGI.pm version 2.81 with version 2.93 -
http://stein.cshl.org/WWW/software/CGI/#download (I've just directly replaced the .pm file -
/lib/perl5/5.8.0/CGI.pm
) and the uploads are working fine - haven't run into any other problems from doing this either, yet...
--
TWikiGuest - 30 Apr 2003
Thanks Guest, for solving this, and to Boris for including the detail. The latest CGI.pm module (2.93) is also on CPAN, so for others who have this problem,
cpan
followed by
install CGI
should also work (this will also update the docs and any other files in the module.) To check your current CGI version, just run
testenv
, or type
i CGI
into the
cpan
tool under
CygWin.
I'll add this to
IssuesWithPerl5dot8 as it's specific to (Cygwin) Perl 5.8.
I've also updated testenv in
TWikiAlphaRelease to recommend this CGI.pm upgrade on Cygwin Perl 5.8.0 - downloadable from
CVSget:bin/testenv and can be used with any TWiki release. Can someone with this version of Perl test this? It would also be nice to know if non-Cygwin users of CGI.pm need this upgrade as well, and if there's an earlier version of CGI.pm that solves this bug.
--
RichardDonkin - 30 Apr 2003
Again, using CYGWIN(1.32)/Apache(1.3.24-5)/Perl(5.8.0-2) and
W2K, googled the CGI.pm versions off various servers.... ran an attach and your new testenv for each (again I just copied the CGI.pm files directly into
/lib/perl5/5.8.0
)
CGI.pm-2.81 - attach:
software error - CGI.pm: Server closed socket during multipart read (client aborted?).
or "Uploaded file does not exist or is empty" - seems to be typical for smaller files
of less < 3500 bytes (I used files full of null bytes), but not 100% repeatable.
testenv: works
CGI.pm-2.82 - could not google this version
CGI.pm-2.83 - could not google this version
CGI.pm-2.84 - attach works, but...
- testenv: "Internal Server Error", the apache error_log says:
"malformed header from script. Bad header=Use of uninitialized value in : /var/www/twiki/bin/testenv"
CGI.pm-2.85 - attach: works
- testenv: same error as for testenv 2.84
CGI.pm-2.86 - attach: works
- testenv: same error as for testenv 2.84
CGI.pm-2.87 - attach: Software Error
"Insecure dependency in sysopen while running with -T switch at (eval 18) line 8"
- testenv: same error as for testenv in 2.84
CGI.pm-2.88 - attach: works
- testenv: same error as for testenv 2.84
CGI.pm-2.89 - attach: works
- testenv: same error as for testenv 2.84
CGI.pm-2.90 - attach: works
- testenv: works
CGI.pm-2.91 - attach: works
- testenv: works
CGI.pm-2.92 - attach: works
- testenv: works
CGI.pm-2.93 - attach: works
- testenv: works, no warning to upgrade CGI.pm.
Also, for the versions where testenv fails you get a load of
"CGI.pm: Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/5.8.0/CGI.pm line XYZ"
errors spewed into the apache error_log each time you visit a topic.
Have a
day...
Regards,
--
TWikiGuest - 30 Apr 2003
Wow, thanks for all the testing! I'll set recommended version to 2.90 or higher for now, but would like to fix the testenv problems on earlier versions since it should work on any version of course. Could you paste in the actual error lines found in the Apache error log from one of those tests, so I can see the line number for the uninitialised value errors, particularly the testenv ones?
Perhaps you could also attach a test data file for which the attach fails for you on CGI.pm 2.81? I am running this exact version on Linux at
http://donkin.org, yet attachments seem to work fine there, so I suspect this is platform specific. I did some tests with a 700 byte all-nulls file, and they didn't cause any problems. I've also done larger attachments on this installation.
And... would you care to uncloak yourself, even if you don't want to register?
--
RichardDonkin - 30 Apr 2003
... no probs :), the cause of
"CGI.pm: Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/5.8.0/CGI.pm line 3459"
with CGI.pm version 2.89 for example, is because the path separator character
SL
is not set for
CygWin:
# The path separator is a slash, backslash or semicolon, depending
# on the paltform.
$SL = {
UNIX=>'/', OS2=>'\\', EPOC=>'/',
WINDOWS=>'\\', DOS=>'\\', MACINTOSH=>':', VMS=>'/'
}->{$OS};
When I put
, CYGWIN=>'/'
in (2.90+ has this update), the error messages in the apache log go
AND testenv starts working...
--
JasonShortt - 1 May 2003
Thanks for the update, interesting to see how CGI.pm does this - detecting Cygwin vs other Windows is something that TWiki has had to do for a while. I'll leave the recommended version as 2.90, seems that earlier versions from 2.81 to 2.89 are buggy on Cygwin in various ways. Version 2.752 works OK on Cygwin Perl 5.6.1 at least, and Version 2.81 is fine on Linux.
--
RichardDonkin - 01 May 2003