Bug #14474 Updated: Apache PHP Module cannot seem to handle large amounts of output
| From: | yohgaki@php.net | Date: | Fri, 14 Dec 2001 17:57:09 +0000 |
| Subject: | Bug #14474 Updated: Apache PHP Module cannot seem to handle large amounts of output | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-73776@lists.php.net to get a copy of this message | ||
ID: 14474
Updated by: yohgaki
Reported By: php@brentc.com
Old Status: Open
Status: Critical
Bug Type: Scripting Engine problem
Operating System: Windows XP Pro/Linux
PHP Version: 4.1.0
New Comment:
I think this is critical
Previous Comments:
------------------------------------------------------------------------
[2001-12-12 20:33:45] yohgaki@php.net
This problem reveals a memory limit bailout problem.
Even if PHP exhsusted memory, script does not exit.
PHP logs following logs many times. (Linux/PHP4.1.0, without output buffering)
[13-Dec-2001 10:27:52] PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 10240 bytes) in /home/yohgaki/public_html/bugs/14474/bug.php on line 4
Type is changed to Scripting Engine Problem.
------------------------------------------------------------------------
[2001-12-12 19:28:49] php@brentc.com
Note: this seems to be the same problem as #14222, but I can't seem to append stuff to someone
elses bug so...
This is something I first noticed when I upgraded from XP RC1 to WinXP Final, when using PHP 4.0.6.
I upgraded to 4.1.0 today, and it doesn't solve the problem.
The php apache module doesn't seem able to handle outputting moderate to large sized pages.
I have been able to reliably reproduce the problem with the following script:
<?PHP
set_time_limit(900);
for ($i = 0; $i<1000000; $i++){
print "This is line number " . ($i+1) . "<br>";
}
?>
Viewing this page with internet explorer causes it to go into an almost endless loop of relaoding
the page. It will display the first few 'this line is number...' and then will reload the
page over and over. On some sessions IE will eventually show it's 'The page cannot be
displayed' page, and sometimes it will just reload indefinitly.
Viewing this page with Mozilla/Netscape doesn't have the same effect. Mozilla doesn't go
through the reload loop, but will not show the page as it should either. There will be unexplained
(no errors) jumps in numbers/missing output such as:
This is line number 2368
This is line number 2369This is line number 2517
This is line number 2518
But the errors in output don't occur in the same spot each time. And evenutally (well short of
1,000,000 lines) the output will just stop with no error, often in mid line.
I have found that adding 'flush();' just after the 'print "This is line...'
seems to fix the problem.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14474&edit=1