Limitations on Post data size

Source: Internet
Author: User
Encountered a problem: when the next post to submit data, when more than a certain size, the background of the post data is empty, the background can not receive post data.

Excuse me, what is the reason? Is it because of which PHP function is blocked? Or is it a php.ini setting?


PHP.ini in post_max_size = 64M;


Reply to discussion (solution)

PHP 5.3.9 also has a limit on the number of data items

PHP 5.3.9 also has a limit on the number of data items



Which data item is the limit?

Number of post form controls

Number of post form controls




Is it max_file_uploads?

Do you have a file??
? Is there a upload_max_filesize need?

Do you have a file??
? Is there a upload_max_filesize need?




Upload_max_filesize = 30M
Max_file_uploads = 500
Post_max_size = 64M;

This setting makes sense to be able to satisfy the general post data submission.

Yes, but yours?? How big is it?

How big is the data of your POST, Print_r ($_post); Look.

How big is the data of your POST, Print_r ($_post); Look.




echo Print_r ($_post);

Output results


Array
(
)
1


Very strange output.

Print_r ($_post);

Print_r ($_post);



The output shows that the post variable is too large for the data being submitted.
Test alone, the data if more than 64999, will not be able to submit the normal, less than this data, the background can receive.

In addition, this data is too large to affect other post data.

Print_r ($_post);
Print out an empty array, indicating that you did not submit by post
Or you're in php.ini. Disable the Post submission method

If the post fails (the data is outside the allowable range) then nothing is printed.

Print_r ($_post);
Print out an empty array, indicating that you did not submit by post
Or you're in php.ini. Disable the Post submission method

If the post fails (the data is outside the allowable range) then nothing is printed.



Seems to be limited to the size of a single post data, but, do not know whether the php.ini inside is limited or where, the online search of the relevant conditions can not solve the problem.

You look at Echo file_get_contents (' php://input '); The results

General error message, you do not go to see

Find out the reason, the previous days added Suhosin function, by this suhosin to limit. Now the question becomes: How to configure Suhosin?
Suhosin.post.max_value_length 65000 65000

It's done. Add Suhosin settings to the php.ini

Suhosin.post.max_value_length = 4194304
Suhosin.post.max_vars = 20000
suhosin.request.max_vars=2000

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.