Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 5927
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: Nobody in particular
Requestors: dayfuaim [...] msx.ru
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: Problem uploading files (v. 3.04)
System: Apache 1.3.29 + Perl 5.8.3 + CGI.pm 3.04 on Debian-based Linux. Problem: Uploading file on server results in empty filehandler => zero-length files. I use: " use CGI qw(:standard); no strict; $q = new CGI; $fh = $q->upload($from); # $from — field name in form open (OUTFILE,">".$to) || print "Couldn't open to write '$to': $!"; binmode(OUTFILE); while (<$fh>) { print OUTFILE $_; } close(OUTFILE); " "multipart/form-data" exists in <form>. No errors/warnings neither in Apache nor in Perl. On CGI.pm 2.47 this works. But unfortunately I can't roll back to this version. :((
I cannot reproduce this bug. Please send both the script that you use to elicit the bug and the form that you are using. Thank you.
I would add that the example script you sent doesn't define the $from variable and so can never work as you've written it. I would appreciate it if you can send a short script that elicits the bug which does not contain obvious red herrings.