CGI File Upload Problem
Raxie
raxie at bulacan.ph
Fri Aug 27 07:06:40 UTC 2004
Hi,
Here's the upload portion of the code. $fh is the file being uploaded that
came from the form.
if ($line=<$fh>) { --> THIS IS THE LINE THAT IS HAVING A PROBLEM
UNDER FEDORA BUT WORKS UNDER RH9
my $fexists=scalar(stat($CURRENT_FOLDER.$new_filename));
if (open(FILE,">$CURRENT_FOLDER$new_filename")) {
print FILE $line;
while ($line=<$fh>) {
print FILE $line;
}
close(FILE);
Note("Old file was overwriten") if ($fexists);
if ($fexists) {
Log("Owerwriten: $CURRENT_FOLDER$new_filename");
} else {
Log("$CURRENT_FOLDER$new_filename");
}
} else {
Note($!);
Log("Error: $!");
}
}
-----Original Message-----
From: fedora-list-bounces at redhat.com [mailto:fedora-list-bounces at redhat.com]
On Behalf Of Paul
Sent: Friday, August 27, 2004 2:50 PM
To: For users of Fedora Core releases
Subject: Re: CGI File Upload Problem
Hi
> Can someone help me on this please.
Not really - the code needs to be seen. I'm assuming you
have /etc/httpd/conf/httpd.conf set correctly for CGI.
TTFN
Paul
--
"Our enemies are innovative and resourceful - and so are we,"
"They never stop thinking about new ways to harm our country and our
people - and neither do we." - George W. Bush, Aug 2004
More information about the fedora-list
mailing list