Welcome Guest, Not a member yet? Register   Sign In
Lost data from <form method="POST"> when file that will be uploaded is big.
#1

[eluser]Unknown[/eluser]
Hi! I'm Korean user of Code Igniter.
I got a such a big project that will be maded in CodeIgniter.

As u guys know, I got in problem with file_upload. maybe it's about sending data from form(POST).

I got 3 input tags which type is text, text and file.

<code>
&lt;form method="POST" action="/test/testProcess" enctype="multipart/form-data"&gt;
&lt;input type="text" name="first" /&gt;
&lt;input type="text" name="second" /&gt;
&lt;input type="file" name="userfile" /&gt;
&lt;/form&gt;
</code>

when I try to submitting that form's datas, It has no problem.
But! when the size of file is too big, the page can't get rest of two input(text)'s values.

What I'm trying to talk is it has nothing to do with file I think.
Maybe if there needs long time to submitting form, it doesn't work.

So, I'm just curious about it.
if u guys help me out? it'd be very helpfule to me to go to next step.!

thanks guys.
#2

[eluser]InsiteFX[/eluser]
Check your php.ini there is a max size for post!
Code:
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M

; Maximum size of POST data that PHP will accept.
; http://php.net/post-max-size
post_max_size = 8M

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 128M

NOTE:
post_max_size
Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size. When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used. If the size of post data is greater than post_max_size, the $_POST and $_FILESsuperglobals are empty. This can be tracked in various ways, e.g. by passing the $_GET variable to the script processing the data, i.e. &lt;form action="edit.php?processed=1"&gt;, and then checking if $_GET['processed'] is set.
#3

[eluser]Unknown[/eluser]
Thank u so much!
I'm very glad to know it exactly.
thanks!!




Theme © iAndrew 2016 - Forum software by © MyBB