File Upload Problems

From: Date: Fri, 17 Nov 2000 16:57:21 +0000
Subject: File Upload Problems
Groups: php.db 
Request: Send a blank email to php-db+get-4516@lists.php.net to get a copy of this message
Hi, I'm having problems uploading files from forms on Win32 with Apache 1.3.12. I can upload files with Perl, but not PHP. It seems whatever mechanism copies the files from Apache to the PHP temp directory isn't working because when I check the temp directory before, after, during an upload, nothings going on. Furthermore, when I look at the variable returned from the CGI, it's the user's filepath, not the server one. These are the setting in my php.ini: file_uploads = On ; Whether to allow HTTP file uploads upload_tmp_dir = G:/PHP/TEMP/ ; temporary directory for HTTP uploaded files (will use system default if not specified) upload_max_filesize = 2M ; Maximum allowed size for uploaded files This is my PHP script: <HTML> <HEAD> <TITLE>PHP is Da Bomb!!!</TITLE> </HEAD> <BODY> <?PHP if (isset($userfile)) { print "Variable: $userfile<P>"; print "File: $userfile_name<P>"; copy($userfile, "E:\\Public\\donkey.txt"); } ?> <FORM ENCTYPE="mutlipart/form-data" ACTION="<?PHP print $PHP_SELF?>" METHOD="POST" > <INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="1024000"> <INPUT TYPE="file" NAME="userfile"> <INPUT TYPE="submit" VALUE="Get File"> </FORM> </BODY> </HTML> I'd appreciate any help, Gaf

« previous php.db (#4516) next »