Reputation: 51
We have developed a web application using php. It worked perfectly until the client migrated it to VMware. Ever since some of the forms which were sent in POST are not being sent and we found out that it only happens when above a certain amount of data is being sent. It only happens when running the application in the VMware environment.
HELP please!!
UPDATE: In the apache_error.log file I found the following error: PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0, referer: .....
This param could only be found in the php.ini-development and php.ini-production and it was commented so I've removed the ;; and increased the value and also added the value in the php.ini file but it all being ignored as I can see in the phpinfo() any suggestion?
PHP version 5.3.13
Upvotes: 4
Views: 2965
Reputation: 51
Solved it by increasing the value of max_input_vars in the php.ini file. This worth knowing that one of the symptoms was that the POST array was empty...
Upvotes: 1
Reputation: 9467
Change the value of post_max_size
in php.ini to post_max_size = 2M
or via .htaccesss add this
php post_max_size = 2M
Upvotes: 1
Reputation: 801
The max_input_vars
being commented in php.ini most likely means it is using the default value. You are able to override it by uncommenting it. Commented does not mean ignored in this case.
the post_max_size
parameter should also be configurable inside your php.ini file. Make sure to restart apache before testing and after changing anything in that file. In your php.ini file, find the line that says
post_max_size = 2M
(or whatever max size)
and increase it to 8M or something similar.
Your php.ini file may or may not be located at
/etc/php5/apache2/php.ini
It really varies from distro to distro.
Upvotes: 1
Reputation: 12244
My guess is that you have a distribution configured to handle a
post_max_size
that is higher than the standard 2MB and you are sending "more" than 2MB.
You can override this using a custom php.ini or custom "php_value post_max_size 8MB" depending on the server configuration.
Upvotes: 0