RE: CGI File Upload Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx [mailto:fedora-list-bounces@xxxxxxxxxx]
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



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux