Doc #43366 [Com]: POST: Allowed memory size exhausted in Unknown on line 0

From: Date: Wed, 24 Mar 2010 20:59:03 +0000
Subject: Doc #43366 [Com]: 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-4107@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=43366&edit=1 ID: 43366 Comment by: info at overtrend dot com Reported by: yvan dot taviaud at m4am dot net Summary: POST: Allowed memory size exhausted in Unknown on line 0 Status: Bogus Type: Documentation Problem Package: Documentation problem Operating System: Linux Debian Etch PHP Version: Irrelevant New Comment: I got the similar error after editing php.ini What I did was change the upload and post limit to 3200MB. After taking it back to 32 problem was gone... Previous Comments: ------------------------------------------------------------------------ [2008-11-07 15:09:29] vrana@php.net Nothing to document. ------------------------------------------------------------------------ [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/bug.php?id=43366&edit=1

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