Re: Can't upload file greater than 11kb

From: Date: Sun, 28 Dec 2003 22:40:05 +0000
Subject: Re: Can't upload file greater than 11kb
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-173404@lists.php.net to get a copy of this message
Unfortunately, creating/editing .htaccess is not an operational requirement. Thanks anyway. Chris "Raditha Dissanayake" <raditha@raditha.com> wrote in message news:3FEF0DDD.2050902@raditha.com... > Hi, > > if you are lucky LimitRequestBody could go into a .htaccess file (not > sure though been a couple of months since i last read the manual) > > Chris wrote: > > >It has been my experience that max_file_size does terminate the upload > >process if you include it in the form. > >But you are right, if it gets to the upload, your stuck. > > > >LimitRequestBody is beyond my control as the site is hosted by a third > >party. > > > >Thanks > >Chris > > > > > >"Raditha Dissanayake" <jabber@raditha.com> wrote in message > >news:3FE894CF.4000901@raditha.com... > > > > > >>Hi, > >> > >>It's often said in many newsgroups and articles that the max_file_size > >>is next to useless. It's also said that once IE starts uploading it will > >>not stop even if you keep you foot on the stop button! > >> > >>If i remembers the earlier messages you have said the php.ini settings > >>are correct. If so it could well be that you might be having > >>misconfigured proxy server or firewall in the way. > >> > >>Apache also has a setting (LimitRequestBody) that could effect your > >> > >> > >upload. > > > > > >>all the best > >> > >>Chris wrote: > >> > >> > >> > >>>I don't believe that the MAX_FILE_SIZE needs to be there. It will only > >>>terminate the upload process at the client, rather than wait for the > >>> > >>> > >upload > > > > > >>>to complete. > >>> > >>>Anyway with or without MAX_FILE_SIZE the upload process is being > >>> > >>> > >terminated > > > > > >>>after the file is uploaded. > >>> > >>>When the form is submitted, the selected file is uploaded to the server's > >>>temp directory then copied to the maps dir. For some reason, when the > >>> > >>> > >file > > > > > >>>size exceeds 11kb (very small) the process > >>>gets aborted (with or without MAX_FILE_SIZE). I've put in diagnostic > >>>messages and the POST script throws an error message if it can't find the > >>>file > >>>in the temp directory. I've uploaded several file sizes up to the max of > >>> > >>> > >2MB > > > > > >>>and it appears the file is being uploaded. I base this assumption on the > >>>fact the upload time is proportional to the file size. When the file size > >>> > >>> > >is > > > > > >>>greater than 11kb it appears that the file is deleted from the temp dir. > >>> > >>>Still no idea what is going on. > >>>Chris > >>> > >>>"Larry Brown" <larry.brown@dimensionnetworks.com> wrote in message > > >>>>>>news:CBECIONKKLMDDCIKHALJAENGJLAA.larry.brown@dimensionnetworks.com... > >>> > >>> > >>> > >>> > >>>>The <input type="hidden" ... is more than a convenience for the client. > >>>> > >>>> > >>>> > >>>> > >>>It > >>> > >>> > >>> > >>> > >>>>must be before the ...type="file"... tag and after <form.. (at > >>>>least > >>>> > >>>> > >with > > > > > >>>>Mozilla Firebird as the client) If you have it in there and remember it > >>>> > >>>> > >is > > > > > >>>>in bytes not kb and set it to a size large enough the script accepting > >>>> > >>>> > >the > > > > > >>>>file will show $_FILE['name'] and it will show > >>>>$_FILE['tmp_name'] having > >>>> > >>>> > >>>> > >>>> > >>>the > >>> > >>> > >>> > >>> > >>>>temporary file. Then you take that hidden tag out and do the same the > >>>>$_FILE['tmp_name'] variable will be empty since it did not recieve > >>>>the > >>>> > >>>> > >>>> > >>>> > >>>file. > >>> > >>> > >>> > >>> > >>>>So I know at least in my case that the hidden field has to be there. > >>>> > >>>>Larry > >>>> > >>>>-----Original Message----- > >>>>From: Chris [mailto:cwilli14@rochester.rr.com] > >>>>Sent: Monday, December 22, 2003 8:55 PM > >>>>To: php-general@lists.php.net > >>>>Subject: [PHP] Can't upload file greater than 11kb > >>>> > >>>> > >>>>I've got a situation where I want to upload a file to a server then > >>>> > >>>> > >enter > > > > > >>>>the data in that file into mysql. I have used this well documented > >>>> > >>>> > >upload > > > > > >>>>form > >>>> > >>>><form enctype="multipart/form-data" action="_URL_" > >>>>method="POST"> > >>>>Send this file: <input name="userfile" type="file"> > >>>> > >>>><input type="submit" value="Send File"> > >>>> > >>>></form> > >>>> > >>>>script on many php servers. However I am on one now which is not > >>>> > >>>> > >allowing > > > > > >>>> > >>>> > >>>me > >>> > >>> > >>> > >>> > >>>>to upload a file greater than 12kb. > >>>> > >>>>I know the upload_max_filesize is 2M but something else is stopping the > >>>>upload and I don't have a clue what it is. I know you should include > >>>> > >>>> > >>>> > >>>> > >>><input > >>> > >>> > >>> > >>> > >>>>type="hidden" name="MAX_FILE_SIZE" > >>>>value="30000"> in the above form but > >>>> > >>>> > >>>> > >>>> > >>>that > >>> > >>> > >>> > >>> > >>>>is only a convenience for the user. > >>>> > >>>>This particular server is running php as a cgi module. > >>>> > >>>>Thanks > >>>> > >>>>Chris > >>>> > >>>>-- > >>>>PHP General Mailing List (http://www.php.net/) > >>>>To unsubscribe, visit: > >>>>http://www.php.net/unsub.php > >>>> > >>>> > >>>> > >>>> > >>> > >>> > >>> > >>-- > >>Raditha Dissanayake. > >>------------------------------------------------------------------------ > >>http://www.radinks.com/sftp/ | > >>http://www.raditha.com/megaupload > >>Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader > >>Graphical User Inteface. Just 150 KB | with progress bar. > >> > >> > > > > > > > > > -- > Raditha Dissanayake. > ------------------------------------------------------------------------ > http://www.radinks.com/sftp/ | > http://www.raditha.com/megaupload > Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader > Graphical User Inteface. Just 150 KB | with progress bar.

« previous php.general (#173404) next »