Welcome Guest, Not a member yet? Register   Sign In
$_POST form deletes TextArea 4k (data), but (data) is retained in $_REQUEST
#1

[eluser]Mavarik[/eluser]
I have a form that I submits multiple large textarea fields,via controller. ie.
<textarea 1 = 2092bytes of html wysiwyg data
<textarea 2 = 4296bytes
<textarea 3 = 3096bytes

I run $this->form_validation->run() on all fields as required validation. I get error on textarea 2 not filled in.

on a var_debug($_POST) the results are
textarea 1 (2092)bytes "data shows here"
textarea 2 (0)bytes ""
textarea 3 (3096)bytes "data shows here" etc.

on a var_debug($_REQUEST) the results are
textarea 1 (2092)bytes "data shows here"
textarea 2 (4296)bytes "data shows here"
textarea 3 (3096)bytes "data shows here" etc.

Is this CI issue or browser or other? I'm thinking CI but am not sure.
#2

[eluser]rossj81[/eluser]
Check your php.ini for post_max_size.
Code:
; Maximum size of POST data that PHP will accept.
post_max_size = 8M
I think it's 8 MB by default, but shared hosting environments often set it lower.
If that doesn't work, check Apache's LimitRequestBody and LimitRequestFieldSize directives.
#3

[eluser]Mavarik[/eluser]
Thanks for your reply - and my very delayed response. I thought it might go away, but it hasn't Smile

I don't think its any limit on Php's Part. As the _Request detail in PHP has the info no problems. But it appears that its Codeigniters validation function that has this limit. Will reply once I solve it.

Well I've solved this painfully, by bypassing the CI validation code for some specific text areas. These have TinyMCE on them.
The thing is I can use validation
Code:
array('field' => 'editor1_content', 'label' => 'Strengths', 'rules' => 'trim'),

it works fine, but if I use 'required' it doesn't work.
So I have to manually do a separate 'required' function just for these fields. (The native custom functions also don't work - has to be seperate from CI->form_validation)

This is too weird and the hack will have to do for now.




Theme © iAndrew 2016 - Forum software by © MyBB