php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14358 crash with large numbers of ouput blocks
Submitted: 2001-12-06 04:35 UTC Modified: 2002-06-18 20:57 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: djanix at hotmail dot com Assigned:
Status: Closed Package: Output Control
PHP Version: 4.0CVS-2001-12-06 OS: win32 (2k/xp)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: djanix at hotmail dot com
New email:
PHP Version: OS:

 

 [2001-12-06 04:35 UTC] djanix at hotmail dot com
  hey guys... this has been a problem for me for a long time, and so i finally decided either no one is using php4apache module on win32 because this problem is bad and it's been in php4 for a long time.

  so tonight i decided to research it because i could really benefit from running as a module and i don't want to leave apache.

  two similar bug_id's i found are 11093 & 14348 - they might be related, but the cause they give is much different.

  all i can come up with is this

  if a script produces large numbers of output blocks, it will crash.

  i made a simple script that causes it for me everytime.  the script is large, so i zipped it (1k) and it's available here.

  http://www.newnetwork.com/bigoutput.zip

  if i turn on implicit flushing, the script will execute ok -most- of the time.

  which is where i got my output blocks theory.  but it's theory... if i had more time i would get into the source some more and offer some better advice.

  apache 1.3 module and apache2 filter both have the same problem.

  oh, and i compiled it all from CVS with msvc6.  i've been compiling my own php for a while now without any problems - cgi version only.

  any ideas?  any other information you might want?  

  -ben

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-22 11:34 UTC] sander@php.net
Can't reproduce with 4.1.0 final on Windows 2000 with Apache 1.3.22 (PHP as module), nor with a CVS build from 10 dec.
 [2002-01-26 20:06 UTC] yohgaki@php.net
Although it seems it does not segfault/block. 
It seems there is bailout problem when memory is exhausted.
This has been reported.

<?php
for ($i=0; $i < 1000000; $i++) {
 echo "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
}
?>

=== this errors are repeated for a single request ===
/home/yohgaki/public_html/bugs/large_output/bug.php(3) : Fatal error - Allowed memory size of 8388608 bytes exhausted at output.c:312 (tried to allocate 10240 bytes)

NOTE: memory limit must be enabled.

 [2002-06-18 19:02 UTC] sniper@php.net
Please try PHP 4.2.1 and Apache 1.3.24. Reopen if problem still exists.

 [2002-06-18 20:57 UTC] djanix at hotmail dot com
still does it with apache 1.3.x cvs, apache 2.x cvs, & php 4 cvs. 
i had it do it in debian linux with a current, stable apache & php from cvs at the time.
it did the same thing for the just last week when i tried apache 2.x-cvs & php as cgi !
turning off output buffering, and turning on implicit flush will help fight the problem, but doesn't stop it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC