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

Owner: Nobody in particular
Requestors: dayfuaim [...]

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

Subject: Problem uploading files (v. 3.04)
Download (untitled) / with headers
text/plain 624b
System: Apache 1.3.29 + Perl 5.8.3 + 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 2.47 this works. But unfortunately I can't roll back to this version. :((
Download (untitled) / with headers
text/plain 137b
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.
Download (untitled) / with headers
text/plain 246b
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.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to