#43366 [Opn->Bgs]: POST: Allowed memory size exhausted in Unknown on line 0

From: Date: Fri, 07 Nov 2008 15:09:29 +0000
Subject: #43366 [Opn->Bgs]: POST: Allowed memory size exhausted in Unknown on line 0
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1460@lists.php.net to get a copy of this message
ID: 43366 Updated by: vrana@php.net Reported By: yvan dot taviaud at m4am dot net -Status: Open +Status: Bogus Bug Type: Documentation problem Operating System: Linux Debian Etch PHP Version: Irrelevant New Comment: Nothing to document. Previous Comments: ------------------------------------------------------------------------ [2007-11-21 19:50:21] yvan dot taviaud at m4am dot net Description: ------------ Allowed memory size problem when POSTing on a PHP script with 1.5MB data that turns out to be 8MB+ when PHP populates its internal variables ($_POST and so on). This should be better documented in the manual I think, as the default post_max_size is 8M, the same as memory_limit (now I know memory_limit should be 128MB). So this is really confusing, as: - the script name is «Unknown» - post_max_size is too high for this type of error (if not using $_FILES) as memory_limit fires up first - too much time spent on this :-( Reproduce code: --------------- Run a POST request with enough data again any PHP script. Expected result: ---------------- At least the filename in the error (line should still be 0), such as: PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1412991 bytes) in /path/to/my/script.php on line 0 Same thing for POST-max-size error would be great: PHP Warning: Unknown: POST Content-Length of 2250121 bytes exceeds the limit of 1048576 bytes in /path/to/my/script.php on line 0 Actual result: -------------- PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1412991 bytes) in Unknown on line 0 PHP Warning: Unknown: POST Content-Length of 2250121 bytes exceeds the limit of 1048576 bytes in Unknown on line 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43366&edit=1

« previous php.doc.bugs (#1460) next »