Disabling the built-in POST handler

From: Date: Wed, 21 Nov 2007 17:30:10 +0000
Subject: Disabling the built-in POST handler
Groups: php.internals 
Request: Send a blank email to internals+get-33370@lists.php.net to get a copy of this message
Trying to find a way to disable the built-in post form handler for the reasons discussed here: http://marc.info/?l=php-general&m=119160177617046&w=2 I looked at the code of php and found out that inside main/rfc1867.c in function rfc1867_post_handler there is a check whether the posted data content length exceeds the post_max_size parameter. If so it aborts the function (with a warning). (php-5.2.5, main/rfc1867.c, line 798) if (SG(request_info).content_length > SG(post_max_size)) { sapi_module.sapi_error(E_WARNING, "POST Content-Length of %ld bytes exceeds the limit of %ld bytes", SG(request_info).content_leng th, SG(post_max_size)); return; } So setting post_max_size to zero for the script with php_value in the apache configuration disables the built-in post form handler resulting in the desired behaviour! My question is whether this is the expected behavior of php that we can count on and can be used as a solution to our problem. Thanks in advance, Stefanos Stamatis.

« previous php.internals (#33370) next »