flush() not working on TonidoPlug2 php plugin

Questions related to developing on the Tonido Platform
vincentchan
Rookie Tonidoid
Rookie Tonidoid
Posts: 3
Joined: Sat Apr 30, 2011 10:25 am

flush() not working on TonidoPlug2 php plugin

Postby vincentchan » Tue Jan 14, 2014 2:00 am

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!!

User avatar
madhan
Admin Tonidoid
Admin Tonidoid
Posts: 8617
Joined: Tue Dec 30, 2008 12:13 am
Location: Austin, TX, USA
Contact:

Re: flush() not working on TonidoPlug2 php plugin

Postby madhan » Wed Jan 15, 2014 2:05 am

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.

vincentchan
Rookie Tonidoid
Rookie Tonidoid
Posts: 3
Joined: Sat Apr 30, 2011 10:25 am

Re: flush() not working on TonidoPlug2 php plugin

Postby vincentchan » Wed Jan 15, 2014 2:24 am

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?

User avatar
madhan
Admin Tonidoid
Admin Tonidoid
Posts: 8617
Joined: Tue Dec 30, 2008 12:13 am
Location: Austin, TX, USA
Contact:

Re: flush() not working on TonidoPlug2 php plugin

Postby madhan » Wed Jan 15, 2014 4:57 am

The 3rd party plugins never became popular, so we are not sure if this integration is going to be maintained going forward.

User avatar
madhan
Admin Tonidoid
Admin Tonidoid
Posts: 8617
Joined: Tue Dec 30, 2008 12:13 am
Location: Austin, TX, USA
Contact:

Re: flush() not working on TonidoPlug2 php plugin

Postby madhan » Thu Jan 23, 2014 10:48 pm

Yes, we know, most people never get into the applications page and install new apps, they are fine with existing core features.


Return to “Tonido Platform Development”

Who is online

Users browsing this forum: No registered users and 16 guests