Bug #71420 [Opn->Fbk]: Can't echo very large strings

From: Date: Wed, 20 Jan 2016 15:33:36 +0000
Subject: Bug #71420 [Opn->Fbk]: Can't echo very large strings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198798@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71420&edit=1

 ID:                 71420
 Updated by:         rasmus@php.net
 Reported by:        mark at interactivedimension dot com
 Summary:            Can't echo very large strings
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            Performance problem
 Operating System:   Linux
 PHP Version:        5.6.17
 Block user comment: N
 Private report:     N

 New Comment:

Anything in your error log? You could be hitting a configured memory limit.


Previous Comments:
------------------------------------------------------------------------
[2016-01-20 14:12:44] mark at interactivedimension dot com

Description:
------------
Hi

I'm not sure if this is a php bug or some kind of server config.

The script below will not run on my shared server at all. It will however work on my local machine.

It will output a string of up to approx 2million characters but there comes a point where the page
just hangs and never loads.

I can't figure out a way around this. I've tried breaking the string into smaller parts
but I can only output so much before the same thing happens.

Test script:
---------------
<?php

$data = '';

for($i = 0; $i < 3000000; $i++) {
	$data .= 1;
}

echo $data;

?>



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=71420&edit=1


Thread (8 messages)

« previous php.bugs (#198798) next »