#18847 [Fbk->Opn]: Output buffering problem

From: Date: Sat, 10 Aug 2002 22:24:19 +0000
Subject: #18847 [Fbk->Opn]: Output buffering problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16461@lists.php.net to get a copy of this message
ID: 18847 User updated by: ntpt@centrum.cz Reported By: ntpt@centrum.cz -Status: Feedback +Status: Open Bug Type: Output Control Operating System: RH 7.3 PHP Version: 4.1.2 New Comment: I have a script, that generate content (html page). When all page is generated, I need grab script output and do some processing on it. And then save it to file or/and output it to the browser.If the generated page is small, everything works fine. It fails because it fetch only a certain portion of data. Ie if some part of the script (that work without outputbuffering fine ), produce cca 3 MB big html page and then try to fetch content of the output buffer into the variable $data, it fetch only cca 1.5 Mb into. No error messages, crashes, segfaults etc..... Even script execution is not halted, because browser show correct (so correct as it can be without lost data....) results of future processing of $data done by the running script... I try to paly with php.ini, increasing script execution time, increasing memory usage limits atd, trying add some memory to my machine with absolutely no effect on that case.... 4.2.2 I do not try, I am affraid, that I will not be able succefuly build it and integrate with my distribution and with all the extensions I need to run in our production server... PS: Sory for my bad english... Previous Comments: ------------------------------------------------------------------------ [2002-08-10 18:01:34] kalowsky@php.net Please be more specific on how it fails. Does it just end and nothing else happens? Have you tried increasing the max_execution_time value to something else? Have you tried a the PHP 4.2.2 release to see if this occurs there as well? ------------------------------------------------------------------------ [2002-08-10 17:54:08] ntpt@centrum.cz It seems that output buffering can not handle more , than aprox 1.5 Mb output. If i done something like: <? ob_start(); ... ... --generate some BIG output content, ie bightml page $data=ob_get_contents(); ?> $data can never got more then approx 1.5 mb of data. The rest of buffer is cut off and lost. It seems to be more general problem in output buffering, because I try to make some workaround of this (like using ob_get_length(),and if the length of the buffer exceeded some size then ob_get_content(), ob_end_clean(), ob_start()inside the content creation loop, hoping, that i put content of the buffer into the some variable, clean it and start again ovewrcome this limit ), but it fails. The same behavior have 4.0.6 too ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18847&edit=1

« previous php.bugs (#16461) next »