Maximum amount of retrievable values?
Posted by: ruthermelchor (---.79.199.112.clbrz.inet.eastern-tele.com)
Date: September 04, 2014 09:44AM

I have a PHP file that has a form that is supposed to be sending 1060 entries (from 1060 textboxes) to a PHP file which will then add them in a database. But from the 711th textbox to the 1060th, it doesn't retrieve anything and sends me the Undefined index SQL error. The 1060 textboxes basically has the same codes except for some numbers are changed. Is there a limit on the number of textboxes that can be retrieved? If there is a limit, is there a way to increase it? (I am using WAMP/I am not using the GETmethod, only POST)

Basically, from the 711th textbox to the 1060th, gets the Undefined Index error.

Options: ReplyQuote
Re: Maximum amount of retrievable values?
Posted by: Otomatic (Moderator)
Date: September 04, 2014 09:52AM

Hi,

Wampmanager->PHP->php.ini
Replace the value of
max_input_vars = 2500
or more

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Maximum amount of retrievable values?
Posted by: ruthermelchor (---.79.199.112.clbrz.inet.eastern-tele.com)
Date: September 04, 2014 09:54AM

I am using Wamp 2.4, and I can't find 'max_input_vars' in it, can I just add it and where should I?

Options: ReplyQuote
Re: Maximum amount of retrievable values?
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: September 04, 2014 10:19AM

Yes, its a valid command to PHP, I assume that version of PHP just assumed the default and didnt have that param in the php.ini

|Find this section of your php.ini file

max_input_time = 60

; Maximum input variable nesting level
; [php.net]
;max_input_nesting_level = 64

and add it in there like this

max_input_time = 60

; Maximum input variable nesting level
; [php.net]
;max_input_nesting_level = 64

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

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 2 time(s). Last edit at 09/04/2014 10:19AM by RiggsFolly.

Options: ReplyQuote
Re: Maximum amount of retrievable values?
Posted by: ruthermelchor (---.79.199.112.clbrz.inet.eastern-tele.com)
Date: September 04, 2014 10:29AM

Still sending the Undefined index, I am printing all the variables in the '$_POST' method and after the 710th textbox, it is undefined. Does a browser also has this setting too? Maximum post values?

Options: ReplyQuote
Re: Maximum amount of retrievable values?
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: September 04, 2014 10:54AM

Did you edit the correct php.ini.

Use the wampmanager menus to make sure you edit the correct php.ini ( there are 2 )

So do

left click wampmanager icon -> PHP -> php.ini

The correct file is actually located in \wamp\bin\apache\apache2.x.y\bin\php.ini but use the wampmanager menus to edit it, its safer and more lkely to edit the right file.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Maximum amount of retrievable values?
Posted by: ruthermelchor (---.79.199.112.clbrz.inet.eastern-tele.com)
Date: September 04, 2014 10:58AM

Yes I did change it using that process. Can I send you a sample of my files for you to be able to personally see it?

Options: ReplyQuote
Re: Maximum amount of retrievable values?
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: September 04, 2014 01:06PM

Ok maybe the limitation is not just to the number of parameter but also the allowed size of the posted data.


Look at your php.ini again and check this

; Maximum size of POST data that PHP will accept.
; [php.net]
post_max_size = 8M

Change the value to something larger ( 16M ) and see if you get more variables available in $_POST, keep increasing until they are all available

It may also be a good idea to check for
memory_limit = 
and increase that a little, usually best to increase this in 4M blocks

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Maximum amount of retrievable values?
Posted by: Otomatic (Moderator)
Date: September 04, 2014 03:45PM

Hi,

Documentation for max-input-vars

See php_error.log file to see what error or warning there is.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Maximum amount of retrievable values?
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: September 04, 2014 03:57PM

Hi Oto,

He claims he already changed that parameter, so I was just taking the next step and assuming that the Amount of data may have been exceeded as well as the number of allowed parameters.

Sorry to but in on your conversation.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Maximum amount of retrievable values?
Posted by: Otomatic (Moderator)
Date: September 04, 2014 05:59PM

Hi,

> Sorry to but in on your conversation.
There is not to be sorry. Our goal, both of us, is to help!
If there has "error_reporting = E_ALL" in php.ini, we'll know if it's a memory overflow or exceeding the number of variables. The documentation says it will have a "warning" if there is exceeding the number.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 09/04/2014 06:43PM by Otomatic.

Options: ReplyQuote
Re: Maximum amount of retrievable values?
Posted by: ruthermelchor (---.79.199.112.clbrz.inet.eastern-tele.com)
Date: September 05, 2014 03:36AM

I had WAMP services restarted; did not fixed it. Restarting the PC solved it. Increasing max_input_vars, post_max_size, & memory_limit solved it. Thank you for directing me in the right idea/solution, it is awesome to experince this forums and be helped by people without 'downvoting' the question for technicalities/upvotes.

Options: ReplyQuote
Re: Maximum amount of retrievable values?
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: September 05, 2014 10:30AM

Been to stackexchange then I see. I didnt see your question over there.

Glad to be of help.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.