FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Output status during processing
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Output status during processing [message #179530 is a reply to message #179529] Sun, 04 November 2012 21:52 Go to previous messageGo to previous message
Scott Johnson is currently offline  Scott Johnson
Messages: 196
Registered: January 2012
Karma:
Senior Member
On 11/4/2012 1:28 PM, M. Strobel wrote:
> Am 04.11.2012 20:23, schrieb Scott Johnson:
>> Hello
>>
>> I hate to come here with a question without any tried code but I really do not even
>> know where to start, I have never attempted this before without a net.
>>
>> What I would like to do is provide an output to the browser during a long processing
>> term.
>>
>> Exactly what I am doing is this.
>>
>> I am loading a csv file to update inventory.
>>
>> During this process I am flushing the current Table and then loading the new and then
>> comparing the inventory table to a product table and would like to provide status of
>> where we are in the process what items matched and changed and so forth in real time.
>>
>> I have done some similar tasks in JS but with minimal steps in the processing then
>> what I am trying to accomplish.
>>
>> I did some binging and found that it may have to do with output buffering but nothing
>> particular to my situation. (as far as I could find)
>>
>> If this is possible could someone point me in the right direction and I will do the
>> leg work.
>
> Are you starting your long running job in the browser? Not good, the whole setup is
> designed for request-response, and not long running jobs.
>
> I would try to design the long running update-compare job as a separate process,
> writing status or progress information to a file/a db table. Then you have a
> corresponding script you call in your browser, showing you status and progress. This
> could be done with whole page refreshs or with ajax.
>
> /Str.
>

Ok that makes makes sense.

And yes it was started in the browser on a file upload from a form field.

I could use AJAX to load the file and then process it in the background
sending status points as it goes through AJAX.

I have done this is the past just not for so many steps to perform.

The more I read about the PHP buffer functions, I could not find a way
that would periodically send text without a header issue.

Guess why they have different tools for the different needs.

Thanks Str.

Scotty
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: adding a method to a built-in class ?
Next Topic: Help required with UPDATE columns
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Dec 20 13:55:09 GMT 2024

Total time taken to generate the page: 0.06641 seconds