Page 1 of 1

flush() not working on TonidoPlug2 php plugin

Posted: Tue Jan 14, 2014 2:00 am
by vincentchan
Hi,

I am now developing an app based on Tonido php development platform. I am using TonidoPlug2 for testing. The app is going to provide a long connection to the client. I used the flush() function to flush out the output to the client. But it is not working. Below is the code.

Code: Select all

<?php
header("Content-Type: text/plain");
set_time_limit(0);

$infoString = "Hello World" . "\n";
while( isset($infoString) )
{
        echo $infoString;
        ob_flush();
        flush();
        sleep(5);
}
?>


Can anyone help me figure out what the problem is?

Thanks!!

Re: flush() not working on TonidoPlug2 php plugin

Posted: Wed Jan 15, 2014 2:05 am
by madhan
This is not a tonido php specific issue, but data sent to the browser might not be shown unless the size crosses 256 characters in many cases, you might want to check with larger http response payloads.

Having said that, the PHP platform is not being actively maintained or developed anymore, so it is likely that it (outside the core systems) gets deprecated shortly.

Re: flush() not working on TonidoPlug2 php plugin

Posted: Wed Jan 15, 2014 2:24 am
by vincentchan
Thanks for your reply.

And if the php platform is not going to be continued, what kind of platform will be available for us to use?

Re: flush() not working on TonidoPlug2 php plugin

Posted: Wed Jan 15, 2014 4:57 am
by madhan
The 3rd party plugins never became popular, so we are not sure if this integration is going to be maintained going forward.

Re: flush() not working on TonidoPlug2 php plugin

Posted: Thu Jan 23, 2014 10:48 pm
by madhan
Yes, we know, most people never get into the applications page and install new apps, they are fine with existing core features.