Return-Path: Delivered-To: apmail-perl-embperl-archive@perl.apache.org Received: (qmail 13182 invoked by uid 500); 28 Mar 2003 09:42:53 -0000 Mailing-List: contact embperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list embperl@perl.apache.org Received: (qmail 13165 invoked from network); 28 Mar 2003 09:42:53 -0000 Received: from cpe-144-137-105-142.nsw.bigpond.net.au (HELO emu.ext-unix.urnet.com.au) (144.137.105.142) by daedalus.apache.org with SMTP; 28 Mar 2003 09:42:53 -0000 Received: from [10.0.0.30] (helo=madcow.pasture.com.au) by emu.ext-unix.urnet.com.au with esmtp (Exim 3.35 #1 (Debian)) id 18yqNw-0004ik-00; Fri, 28 Mar 2003 20:42:54 +1100 Received: from localhost (localhost [127.0.0.1]) by madcow.pasture.com.au (Postfix) with ESMTP id 2987F3CCB; Fri, 28 Mar 2003 20:42:40 +1100 (EST) Received: from dolly (dolly.pasture.com.au [10.0.128.103]) by madcow.pasture.com.au (Postfix) with ESMTP id 6A0503CC5; Fri, 28 Mar 2003 20:42:37 +1100 (EST) Received: from dolly ([127.0.0.1] helo=dolly.inodes.org) by dolly with esmtp (Exim 3.36 #1 (Debian)) id 18yqNg-0001xX-00; Fri, 28 Mar 2003 20:42:36 +1100 Date: Fri, 28 Mar 2003 20:42:36 +1100 Message-ID: <87r88rhlo3.wl@gus.inodes.org> From: Angus Lees To: Richard Schilling Cc: embperl@perl.apache.org Subject: Re: uploading files results in an empty file In-Reply-To: <200303270041.ADG19526@ms6.verisignmail.com> References: <200303270041.ADG19526@ms6.verisignmail.com> Mail-Followup-To: embperl@perl.apache.org User-Agent: Wanderlust/2.10.0 (Venus) XEmacs/21.4 (Portable Code) X-Emacs-Acronym: Each Mail A Continued Surprise MIME-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N At Wed, 26 Mar 2003 16:41:30 -0800, Richard Schilling wrote: > 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 > {'developmentmapfile'}."; > 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. and what error does $! indicate when it dies? -- - Gus --------------------------------------------------------------------- To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org For additional commands, e-mail: embperl-help@perl.apache.org