What happens when a post exceeds the limit of post_max_size?
The server knows the size of the payload by looking at the POST request which contains the size of the request - Content-Length header or when the content is chunked data is sent in a series of chunks. The Content-Length header is omitted in this case and at the beginning of each chunk you need to add the length of the current chunk in hexadecimal format, followed by '\r\n' and then the chunk itself, followed by another '\r\n' [1]
post_max_size is a php directive. The apache server directive is LimitRequestBody [2][3]
Your question is not providing enough information about how you run the PHP under Apache.
- [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding
- [2] https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestbody
- [3] https://httpd.apache.org/docs/2.4/mod/mod_proxy.html