Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cakephp form not posting all field values in POST method

I am using cakephp 2.0 version when I am posting a form that contain 1000 fields(1000 input check boxes) its not submitting all the 1000 fields.Only submitting the 495 field and their values. After posting it displaying the following data(Response) in my controller

[data] => Array
    (
        [Ecommerce] => Array
            (
                [r] => no
                [rcompleted] => yes
                [rstart_date] => May 1, 2013  00:00
                [rcompleted_date] => May 31, 2013  00:00

                [1] => Array
                    (
                        [id] => 1
                    )

                [2] => Array
                    (
                        [id] => 1
                    )
                    .
                    .
                    .
                    .
                    .
                    .
                 [495] => Array
                    (
                        [id] => 1
                    )
                )

Please note the problem not in localhost only in Live server. I am thinking may be the problem related to max_input_vars but not have idea on this.. any ones help appreciated

like image 477
AnNaMaLaI Avatar asked Nov 25 '25 01:11

AnNaMaLaI


1 Answers

We can change the following line in php.ini:

; How many GET/POST/COOKIE input variables may be accepted
max_input_vars = 1000

We can increase this to 3000 and then it will work.

like image 200
Neil Avatar answered Nov 26 '25 15:11

Neil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!