How to Lift POST Variables Limit in PHP 5.7

  • by

One of my web pages that contains over 2000 POST variables. After submit, only the first 1000 variables were added (or inserted) into the database. Is there any limitation on number of variables processed? Yes, it is. Here is how I lift the number of limit on POST variables.

Raise the value of max_input_vars

[root@test ~]# vi /etc/php.ini
...
; How many GET/POST/COOKIE input variables may be accepted
; max_input_vars = 1000
max_input_vars = 100000

Restart httpd service.

[root@test ~]# systemctl restart httpd

As you can see, we lifted the limitation on number of variables by setting a higher value of max_input_vars in php.ini. And don’t forget to restart httpd service to make it work.

Leave a Reply

Your email address will not be published. Required fields are marked *