Results 1 to 8 of 8

Thread: Post problem on my server

Hybrid View

  1. #1

    Question Post problem on my server

    Hello everybody.
    I have a server for testing purposes.
    I discovered that my post is limited when i send data in aray;

    my inputs have names like this:
    name='Data[$k][View][$id]'
    name='Data[$k][Edit][$id]'

    this will generate an post like this:

    Data=>Array{
    [1]=>Array{
    [View]=>Array{
    [1]=1
    }
    [Edit]=>Array{
    [1]=1
    }

    [2]=>Array{
    [View]=>Array{
    [2]=2
    }
    [Edit]=>Array{
    [2]=2
    }

    [3]=>Array{
    [View]=>Array{
    [3]=3
    }
    [Edit]=>Array{
    [3]=3
    }


    .
    .
    .



    [23]=>Array{
    [View]=>Array{
    [23]=23
    }
    [Edit]=>Array{
    [23]=23
    }






    }
    }


    But when i get to my 24 key my post is empty.


    if i take out the values for key 23 than my 24'th one appears...

    so obvious my post is limited by something... either number of keys, or array length or character length...

    Anyone knows something about this?

    i've tried some stuff already without any success. In my php.ini ive set register_long_arrays=On

    restarted apache and no changes....

    Please... any hint will be much appreciated!
    Thx and have a great day!

  2. #2
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Post problem on my server

    On 04/06/2011 06:36 AM, cpcos wrote:
    >
    > Hello everybody.
    > I have a server for testing purposes.
    > I discovered that my post is limited when i send data in aray;


    what operating system and version are you using?

    this is the applications forum: what application is giving you this problem?

    "my post is limited"--please define 'post' (as in 'email'? as in
    'message' to a 'newsgroup'? as in 'posting' to accounting/billing
    application? or what?)

    "when i send data in aray"--please tell how you are sending, and to where..

    --
    CAVEAT: http://is.gd/bpoMD [NNTP via openSUSE 11.3 + KDE4.5.5 +
    Thunderbird3.1.8] Can you believe it? This guy Ralph wins $181 million
    in the lottery last Wednesday, and then finds the love of his life just
    2 days later. Talk about LUCK!

  3. #3

    Default Re: Post problem on my server

    I'm really sory.. might not be the right place to ask this question. I'm new here and i've asked everywhere about this problem and nobody seems to know what's going on.

    I think because here everybody knows very well open suse linux might know something.

    Basically my server is a web server.

    I program on it with php and mysql.

    The post is $_POST.

    I have a web page that has a lot of checkboxes.I'm doing an user permission module.

    So those checkboxes look like this:
    <input type='checkbox' name='Data[$ModuleID][View][$ColumnID]' value='$ColumnID'>
    or
    <input type='checkbox' name='Data[$ModuleID][Edit][$ColumnID]' value='$ColumnID'>

    Basically all tables in my database have an unique ID and their columns as well.

    I store this in 2 separate tables called Module and ModuleColumn.

    In order to give or take access to a user i store into a field a coma separated id of modules and columns he has access to

    it would look like this at the end:
    1|1,2,3,4^2,3
    here first 1 is module id.
    1,2,3,4 are columns to view
    2,3 are columns he can edit

    The main form that submits all this is organized like this:
    ModuleName
    checkboxes for view
    <input type='checkbox' name='Data[1][View][1]' value='1'>
    <input type='checkbox' name='Data[1][View][2]' value='2'>
    <input type='checkbox' name='Data[1][View][3]' value='3'>
    <input type='checkbox' name='Data[1][View][4]' value='4'>
    <input type='checkbox' name='Data[1][View][5]' value='5'>

    checkboxes for edit

    <input type='checkbox' name='Data[1][Edit][1]' value='1'>
    <input type='checkbox' name='Data[1][Edit][2]' value='2'>
    <input type='checkbox' name='Data[1][Edit][3]' value='3'>
    <input type='checkbox' name='Data[1][Edit][4]' value='4'>
    <input type='checkbox' name='Data[1][Edit][5]' value='5'>

    first key 1 is ModuleID
    after [View] and [Edit] those keys are ModuleColumnID

    and the form is adding next module and so on..

    ex:
    checkboxes for view module 2
    <input type='checkbox' name='Data[2][View][1]' value='1'>
    <input type='checkbox' name='Data[2][View][2]' value='2'>
    <input type='checkbox' name='Data[2][View][3]' value='3'>
    <input type='checkbox' name='Data[2][View][4]' value='4'>

    checkboxes for edit module 2

    <input type='checkbox' name='Data[2][Edit][1]' value='1'>
    <input type='checkbox' name='Data[2][Edit][2]' value='2'>
    <input type='checkbox' name='Data[2][Edit][3]' value='3'>
    <input type='checkbox' name='Data[2][Edit][4]' value='4'>



    Well everything was fine until i've added my 24'th module.

    i have 194 checkboxes until this point.

    The 195 one won't be submitted by the form.

    so my post array shows my Data[23][View][1] to 14 and few in Edit side

    but Data[24]... does not exist.

    So i think the $_POST is limited by something. i even measured the size of it in the page it submits.I used this:

    $mypost = http_build_query($_POST);
    $size = strlen($mypost);

    and it is 6045.

    My max_post_size on the php.ini is set to 20M.

    I hope this helps you to understand what my problem is.

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Post problem on my server

    Which php.ini? You should be setting the one for apahe2, not for the cli. Display a PHP page with the function call phpinfo(); and see what the limit in effect is.

  5. #5

    Default Re: Post problem on my server

    plase go here:
    prosoft.ca/phpini_to see.php

  6. #6
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Post problem on my server

    Sorry I do not offer free remote diagnosis services. Please follow my suggestion and display your php.ini parameters using phpinfo(); and work it out.

  7. #7

    Default Re: Post problem on my server

    that was it.... suhosin.post.max_vars
    Thanx anyway!

  8. #8

    Default Re: Post problem on my server

    it hink i found it!!!!!!!!
    actually the number of checkboxes that went through is exactelly 200...
    and here's what i see in my php.ini
    suhosin.post.max_vars 200 200

    how can i change suhosin value for that???

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •