RE: [PHP] FileUpload problematic

From: Date: Mon, 19 Mar 2001 16:53:05 +0000
Subject: RE: [PHP] FileUpload problematic
Groups: php.general 
Request: Send a blank email to php-general+get-44586@lists.php.net to get a copy of this message
Would copy( $file, "somewhare/$file" ) be more platform independent? -- ben.2.edwards@bt.com (ben@work untill end March) ben@videonetwork.org (ben@home) > -----Original Message----- > From: Chris Lee [SMTP:lee@mediawaveonline.com] > Sent: Monday, March 19, 2001 2:38 PM > To: php-general@lists.php.net > Subject: Re: [PHP] FileUpload problematic > > everything is working as it should. php handels its own garbage > collection, when the script is over the file is deleted. you will have to > copy or move the file somewhere. or just do something with it and allow > php todo its ob and delete it when your done the script. > > ecec("cp $file /somewhere/$file_name"); > > > -- > > Chris Lee > lee@mediawaveonline.com > > > > ""Thalis A. Kalfigopoulos"" <thalis@cs.pitt.edu> wrote in message > > news:Pine.LNX.4.21.0103161556530.1486-100000@arsenic.cs.pitt.edu... > Helloppl, > a problem with a file_upload form :-( Here is what I've done so far: > > File test.php which has the form is this: > <HTML> > <BODY> > <?php include("handle_upload.php"); ?> > <FORM ENCTYPE="multipart/form-data" ACTION="<?php print $PHP_SELF > ?>" > METHOD="POST"> > <INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" > VALUE="64000"> > <INPUT TYPE="submit" VALUE="go!"> > <INPUT TYPE="file" NAME="up_file"> > </FORM> > </BODY> > </HTML> > > Here is the included php file (handle_upload.php): > <?php > if(isset($up_file)){ > print "<P>You have succesfully sent the following file:<BR>\n"; > print "path: $up_file<BR>\n"; > print "filename: $up_file_name<BR>\n"; > print "filesize: $up_file_size<BR>\n"; > print "filetype: $up_file_type<BR>\n"; > } > ?> > > When one submits a file (file exists and is within given MAX_FILE_SIZE > boundaries), the handle_upload.php condition is true, so I get the > following output in my browser: > > You have succesfully sent the following file: > path: /tmp/phpvtMKjj > filename: test2.jpg > filesize: 27365 > filetype: image/jpeg > <and again the form to upload another file> > > Then I go and check under /tmp and I do not find anything :-( > > I have in my php.ini: > ;;;;;;;;;;;;;;;; > ; File Uploads ; > ;;;;;;;;;;;;;;;; > file_uploads = On > upload_tmp_dir = /tmp > upload_max_filesize = 2M > > I am using Apache 1.3.14 with DSO and php is a .so and Php is version > 4.0.4 > > It is not a permissions problem cause I checked the Apache logs, and all > dirs that need to be accessed are actually writable by the httpd user. I > have read through "Handling file uploads" > (http://www.php.net/manual/it/features.file-upload.php) and I don't see > what is wrong :-( > > > thanks ins advance, > thalis > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#44586) next »