Dear all,

I have a strange problem with upload file. It was happened only once but I'm afraid that
it can be again.
I have a some form like that:


<form name="upload_answer" action="upload.epl" enctype="multipart/form-data" method="post">

Select File:&nbsp; <input class="textinput" id="answer_file" name="answer_file" type="file" enctype="multipart/form-data">
</form>



In upload.epl I just get filehandler and use it as method's argument:

my $up_obj = new UploadFile();
$up_obj->upload_file($fdat{answer_file});

At the end inside class I use that file handler:

sub upload_file {
   my $self = shift;
   my $fh = shift || die 'File is not uploaded!';

while(my $row = <$fh>) {
die "Length of row should be 80!" unless length($row) == 80;
. . .
}
. . .
}


Recently, I've found in Apache log file that message:
Warning in Perl code: readline() on closed filehandle fh00001C%3A\fts\receive\PBW036H3.023


It seems that file was uploaded but before reading procedure was started file handler was closed by
some reason. The strange thing is the loop was run once and program was not die in checking of
length of row!


So, does somebody know where Embperl stores uploaded files? Why file handler was closed and how check is file handler is open or not?

I use: - Linux RedHat 9, Embperl/2.0b9, Apache/2.0.40, mod_perl/1.99_07-dev, Perl v5.8.0

Thanks in advanced.

--
Best regards, Michael Stepanov
Perl/Linux Developer
Francoudi & Stephanou Ltd
Tel: +357 25-867154
Email: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to