max size of a php post?

前端 未结 3 909
后悔当初
后悔当初 2021-01-03 06:30

Could it be that a POST request is limited to size? I have a large procedure I want to cache the output from. Basically I want to store a lare html-table in cache because of

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-03 07:32

    Look for these settings in your php.ini

    ; Maximum size of POST data that PHP will accept.
    ; http://php.net/post-max-size
    post_max_size = 8M
    
    ; Maximum amount of memory a script may consume (128MB)
    ; http://php.net/memory-limit
    memory_limit = 128M
    

    post_max_size specifies the maximum size of a POST, and since it has to be contained in memory, memory limit has to be bigger. The memory, will have to contain the running program and all the heap variables, including the POST.

    If you increase only post_max_size over or near to the memory limit and forget to increase memory_limit, the POST size will be limited to a lower value when the memory is exhausted.

    In this example you can see the default settings.

提交回复
热议问题