You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ratan Jha <ra...@patni.com> on 2001/03/11 14:20:12 UTC

Not able to read file

Hi,
i'm stuck with a very peculiar problem.
i'm trying to upload a file using mod_perl but whenevr I attempt to do that the server hangs.
The file is opened in the specified directory but the "read" attempt fails.
The server is not able to read the file from the local machine.
Here is the code snippet:
if(open(OUTFILE, ">.$Data."/".$filename") {
*while(my $bytesread = read($file, my $buffer, 1024) {
print OUTFILE $buffer;
}
close(OUTFILE);
}
$filename is the name of the file and $data is the path.
$file is the path of the file on the local machine.
*The flow stops at this line and the server hangs here.
I'll be thankful if I can get some useful tips on this issue.
Thanks,
Ratan