Jump to content

checkboxes via POST don't create array


Go to solution Solved by albaserver,

Recommended Posts

The default behaviour of the php.ini file would be easily changed using apache .htaccess hidden files somewhere on the web hosting directories. Have you checked for error messages in the apache error log file? How about to check the same form's values using a different language let's say bash or perl?  

to mikosiko: max_input_vars is 1000 :(

 

to ginerjim: no more code, only that one I posted in a blank page, nothin'else  :(

So you are writing a script that puts out a "bare" html page?  No headers, no meta, no scripts, no css styling? 

Did you check in the output of phpinfo() if the suhosin extension is installed/enabled in your server?

 

"Additional .ini files parsed" in phpinfo() there is "/etc/php5/conf.d/suhosin.ini" as well.

 

 

So you are writing a script that puts out a "bare" html page?  No headers, no meta, no scripts, no css styling? 

 

Yes! When we found out that the problem was HTTP POST, I prepared an empty page with the only HTTP POST code and a very simple form. Nothin'else.

 

 

is the value 1,000 or is it 1000. these are different to a programming language because the , is a stop character that would result in the value 1 being used.

 

in phpinfo() is 1000 without comma or point.

 

 

Rob

If the suhosin.ini was parsed then phpinfo() should show some of the setup variables for it (or look directly in the ini file)... Even when the default value for all of them is 1000 worth to check them:

Suhosin.post.max_vars

Suhosin.get.max_vars and

Suhosin.request.max_vars

 

Here is the link to the configuration options http://www.suhosin.org/stories/configuration.html

Edited by mikosiko

Some things to do:

  • Use either your browsers developer tools or a tool like Fiddler to inspect the actual request data and ensure the browser is sending all three values in the first place.
  • var_dump($_POST) as the very first thing the script does, even before session_start().
  • what happens if each checkbox has a different name?
  • post the output of your phpinfo() call, or a link to the phpinfo page for us to see.
  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.