Re: file upload temp file is and isn't there

From: Date: Tue, 13 Feb 2001 23:32:43 +0000
Subject: Re: file upload temp file is and isn't there
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39528@lists.php.net to get a copy of this message
A lil clip from Devedge.. you need a VALUE="" field along w/ a NAME="" maybe? This places an element on an HTML form that lets the user supply a file as input. When the form is submitted, the content of the specified file is sent to the server as the value portion of the name/value pair for this input element. Netscape Navigator displays a "Browse" button next to the file input element that lets users select a file from their system to use as the value of the file input element. *Navigator 2.0* If a a form contains a file input element, the value of the ENCTYPE attribute of the FORM tag should be |"multipart/form-data"|.
       Syntax
       |<INPUT TYPE="FILE"
NAME="|/|name" |/| VALUE="|/|filename" |/|>| */ NAME=name/* specifies the name of the input element. This value is used as the name portion of the name/value pair for this element that is sent to the server when the form is submitted. The name is not displayed on the form. */ VALUE=filename/* specifies the initial value of the input element. |<FORM ENCTYPE="multipart/form-data" ACTION="/cgi-bin/example.cgi" METHOD="POST"> <P>File name: <INPUT TYPE="file"> </FORM>| Aaron D. Turner wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Solaris 7 Apache 1.3.14 PHP 4.0.4p1 For the life of me I can't figure out what's going on. I have: <form enctype='multipart/form-data' action='/admin/upload.php' method='post'>
        <input type=hidden name=MAX_FILE_SIZE value=5000>
        <input type=hidden name=uploadingfile value=true>
Choose File: <input name=userfile size=69 type=file><P> <input type=submit value='Send File'></form> and I can try to upload a file, but then the HTTP_POST_FILES hash doesn't get properly populated and no file is stored in the upload directory. Basically: HTTP_POST_FILES["userfile"]
                            Array
                                 (
                                 [name] =>1323.txt
                                 [type] =>text/plain
                                 [tmp_name] =>none
                                 [size] => 0
                                 )
I've set my php.ini with: upload_tmp_dir  = /tmp and nothing gets put in there (I've verified that the dir has world r/w w/
suid). Any ideas of how to debug this futher? - -- Aaron Turner <aturner@pobox.com|synfin.net|linuxkb.org> URI:www.synfin.net They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin pub 1024D/F86EDAE6 Sig: 3167 CCD6 6081 0FFC B749 9A8F 8707 9817 F86E DAE6 All emails by me are PGP signed; a lack of a signature indicates a forgery. I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80 596E 60BF 451B 20E8 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc iEYEARECAAYFAjqJwWEACgkQhweYF/hu2uYnjgCfbXQVLYBwVnmAE5RHRxeTtdFI YgAAoIf9w7fNcbFmxyT/LlRUHa3lHfqB =Jqdm -----END PGP SIGNATURE-----


« previous php.general (#39528) next »