You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Mike Wesemann <mi...@FHI-Berlin.mpg.de> on 2001/05/12 11:39:48 UTC

rflush problem

Hello 
I trying to do something like this:

[+ hello +]
[- 
    $req_rec->rflush; 
    sleep 5;
-]
[+ hello again +]

... but it is not working. Does anybody know how to solve this problem ?

Mike


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: rflush problem

Posted by Gerald Richter <ri...@ecos.de>.
>
> Thanks for your help, but it is still not working.
>
> I'm working with embperl 1.3.1 and have the have following options in
> httpd.conf:
>
> PerlSetEnv EMBPERL_OPTIONS 80
> PerlSetEnv EMBPERL_SESSION_CLASSES "File File"
> PerlSetEnv EMBPERL_SESSION_ARGS "Directory=/export/home/www/sessions"
> PerlSetEnv EMBPERL_MAILHOST mail.rz-berlin.mpg.de
> PerlSetEnv EMBPERL_MAILFROM embperl@w3.rz-berlin.mpg.de
> PerlSetEnv EMBPERL_ESCMODE 0
>
> Do you have another idea whats going wrong ?
>

The setup looks ok.

If your sleep is inside a table or list, Embperl will flush this table not
before the end of the table (that's necessary to support dynamic tables).
Also your browser will not be able to display the table before it got it all
(because it need the to calc the layout)

Gerald

P.S. Please also reply to the mailing list, so other can participate

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: rflush problem

Posted by Gerald Richter <ri...@ecos.de>.
> Hello
> I trying to do something like this:
>
> [+ hello +]
> [-
>     $req_rec->rflush;
>     sleep 5;
> -]
> [+ hello again +]
>
> ... but it is not working. Does anybody know how to solve this problem ?
>

The point is that Embperl is first processing the whole page and outputing
it afterwards (so you are able to set http headers, generate error messages
etc.). So at the point where you call rflush, nothing has been send to the
browser at all. To change this set optEarlyHttpHedears in your httpd.conf
(with EMBPERL_OPTIONS). With this option set, Embperl send the output
immediately and your above code will work. (at least with Embperl 1.x.  2.0
doesn't support optEarlyHttpHedears yet)

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org