Edit your php.ini and set error_reporting
to the production value that is in the comments. Set display_errors
to Off
. That should be enough. Remember to log errors to a log file.
PHP: POST Content-Length Warning
-
02-10-2022 - |
Question
When I try to post some data that exceeds the php.ini post_max_size setting I get this error:
Warning: Unknown: POST Content-Length of X bytes exceeds the limit of Y bytes in on line 0.
I don't want to increase the post_max_size, I just want to be able to turn off the warning and tell if the post data exceeds the post_max_size. I've tried to turn of the warnings with error_reporting but since the warning is on line 0 that doesn't help.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow