Undefined variable on file upload attempt

From: Date: Thu, 06 May 2004 19:33:59 +0000
Subject: Undefined variable on file upload attempt
Groups: php.install 
Request: Send a blank email to php-install+get-13416@lists.php.net to get a copy of this message
I have a script that runs fine on an Apache/PHP/Redhat. I use it to upload a single image and display it. This same script fails on a IIUS/PHP/WindowsNT platform with the following error: Notice: Undefined variable: imageFile in D:\DATA\WEB\www-dev\Temp\pr.php on line 6 I suspect a configuration problem of some sort but dont know for certain. The scripts are as follows: Script 1: -------------------------------------------------------- <HTML> <BODY> <FORM NAME="mainform" METHOD="POST" ACTION="pr.php" ENCTYPE="multipart/form-data"> <INPUT TYPE="file" NAME="imageFile" SIZE="64"> <INPUT TYPE="submit" NAME="submit" VALUE="submit"> </FORM> </BODY> </HTML> ------------------------------------------------------------ Script 2: ------------------------------------------------------------ <? while( list($k,$v) = each($HTTP_POST_VARS) ) { eval("\$$k = \"$v\";"); } print "IMAGEFILE = '$imageFile'"; $savepath = "myimagefile.jpg"; copy("$imageFile","$savepath") or die("Couldnt copy file '$imageFile' to '$savepath'"); ?> <HTML><BODY> <img src="<?echo "$savepath";?>"> </BODY></HTML> ------------------------------------------------------------ Any help/clue will be greatly apprecitated. Thanks.

« previous php.install (#13416) next »