perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Schilling <>
Subject uploading files results in an empty file
Date Thu, 27 Mar 2003 00:41:30 GMT
Having a particular problem today that I wasn't yesterday :-)

Using the following code to upload a file from a multipart 
form with a file field in it:


if (defined $fdat{developmentmapfile}) {

	open NF, "> /usr/local/apache/htdocs/images/$fdat
{'developmentmapfile'}" or die $! . ": Can't open file $fdat
	binmode NF;
	print NF $buffer while read ($fdat
{developmentmapfile}, $buffer, 32768) or die $! . ": Can't 
write to permanent file during upload.";
	close NF;


The images directory is set to owner nobody, and group nobody.

The file is created, but the code dies when it tries to print 
to NF.  After the script dies, the file size is left at 0.  
Can't for the life of me figure out what's missing.  



--Richard Schilling

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message