Hi
I have a form that uses the input values to retrieve information from a web service. This web service generates a PDF based on the users input, and this PDF is shown on result page of the form.
I regularly poll the server if it has already finished the PDF generation. Now I would like to show the progress of this polling before the entire page is rendered.
This worked very well with chronoforms v3 and PHP 5.2, but with PHP 5.4 and chronoforms v4 I don't succeed to flush the output buffer and then show the progress bar. Is there a trick doing such a task with chronoforms v4?
Any answer is much apreciated.
Bernhard
I have a form that uses the input values to retrieve information from a web service. This web service generates a PDF based on the users input, and this PDF is shown on result page of the form.
I regularly poll the server if it has already finished the PDF generation. Now I would like to show the progress of this polling before the entire page is rendered.
This worked very well with chronoforms v3 and PHP 5.2, but with PHP 5.4 and chronoforms v4 I don't succeed to flush the output buffer and then show the progress bar. Is there a trick doing such a task with chronoforms v4?
Any answer is much apreciated.
Bernhard
Hi Bernhard,
Sorry but I have no idea. As far as I recall there is no big difference between CFv3 and CFv4 in the way that they handle output. But I may not understand the implications of your question :-(
Bob
Sorry but I have no idea. As far as I recall there is no big difference between CFv3 and CFv4 in the way that they handle output. But I may not understand the implications of your question :-(
Bob
I am suspecting it has more to do with PHP 5.4 vs PHP 5.2 instead of chronoforms... I was just curious if there is some event handler already available that woud flush output buffers within chronoforms or if anybody from the community had this issue already, and solved it...
Bernhard
Bernhard
Hi Bernhard,
How did you flush the output with v3 then ?
Maybe try this line just before the progress bar output code:
Regards,
Max
How did you flush the output with v3 then ?
Maybe try this line just before the progress bar output code:
@flush();
Regards,
Max
Hi Max
I did flush the output in v3 with
However it seems to be completely PHP5.4 related, because after I switched to PHP5.4 the buffer flushing in v3 stopped working as well. Now I use this in v4, and it works (sort of):
This forces the browser to flush any output directly without buffering. It works, but not the way I want it, as the buffer flushing starts just shortly before the entire page has completed rendering anyway. So it is okayish but not enough. I really suspect something in conjunction with PHP5.4.
Thanks for the help
Bernhard
I did flush the output in v3 with
flush;
ob_flush;
However it seems to be completely PHP5.4 related, because after I switched to PHP5.4 the buffer flushing in v3 stopped working as well. Now I use this in v4, and it works (sort of):
ob_implicit_flush(true);
echo str_repeat(' ',1024*32);
This forces the browser to flush any output directly without buffering. It works, but not the way I want it, as the buffer flushing starts just shortly before the entire page has completed rendering anyway. So it is okayish but not enough. I really suspect something in conjunction with PHP5.4.
Thanks for the help
Bernhard
Hi Bernhard,
I'm not sure, one answer here has some config settings which you may find helpful:
http://stackoverflow.com/questions/4706525/php-flush-not-working
Regards,
Max
I'm not sure, one answer here has some config settings which you may find helpful:
http://stackoverflow.com/questions/4706525/php-flush-not-working
Regards,
Max
This topic is locked and no more replies can be posted.