|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-01 12:49 UTC] ch at hoffie dot info
[2006-10-08 10:22 UTC] ch at hoffie dot info
[2006-11-03 13:26 UTC] ch at hoffie dot info
[2006-12-04 16:20 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ When using the FastCGI SAPI the error message when the memory limit is exceeded (Fatal error: Allowed memory size ... exhausted) is sometimes sent to the real stderr (the pipe) instead of the stderr within the FastCGI protocol (which the FastCGI client would handle). This only occurs in special circumstances. The code <?php $a = str_repeat("a", 100000000); ?> procudes an error regarding the memory limit too, but it is displayed correctly (on the "right" stderr, the FastCGI's one). Sending the same error to different targets sounds inconsistent to me. The problem didn't exist in PHP 5.1.4. Maybe it is related to http://bugs.php.net/bug.php?id=37481? Reproduce code: --------------- Request a file containing <?php for ($x=0;$x<8000000;$x++) $a[] = 'aaaaaa'; echo 'a'; ?> from a webserver which is configured to serve PHP files via FastCGI. Expected result: ---------------- The message Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in /var/www/localhost/htdocs/a.php on line 1 should be served by the webserver (assuming display_errors=1 and error_reporting(E_ALL)) to the client. Additionally the data sent to the FastCGI socket seems to be corrupt (I didn't analyze it, but my own implementation had problems, and lighttpd seems to have canceled the request, my browser tried to download the PHP file (without content of course)). Actual result: -------------- On the console, the webserver (or FastCGI server) was started on, Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in /var/www/localhost/htdocs/a.php on line 1 is displayed.