Long time to finish a program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rahulthathoo

    Long time to finish a program

    Hi

    I have a perl program called by my php script, which in turn is called
    by the browser. Now, the perl program is called using exec, but takes
    a long time to finish. So, till the time the perl script does not
    finish its job, the browser does not show anything. I have messages
    like "Dont close this window", but that does not show up till the
    whole perl program finishes. Is there a way, I can somehow remedy
    this, try to show a message on the browser - "Please while your data
    processes" and then do the processing in the background?

    Rahul

  • Jeff North

    #2
    Re: Long time to finish a program

    On 9 Mar 2007 20:40:41 -0800, in comp.lang.php "rahulthath oo"
    <rahul.thathoo@ gmail.com>
    <1173501640.785 186.173480@v33g 2000cwv.googleg roups.comwrote:
    >| Hi
    >|
    >| I have a perl program called by my php script, which in turn is called
    >| by the browser. Now, the perl program is called using exec, but takes
    >| a long time to finish. So, till the time the perl script does not
    >| finish its job, the browser does not show anything. I have messages
    >| like "Dont close this window", but that does not show up till the
    >| whole perl program finishes. Is there a way, I can somehow remedy
    >| this, try to show a message on the browser - "Please while your data
    >| processes" and then do the processing in the background?
    >|
    >| Rahul
    <?php
    echo "Please while your data processes";
    exec(.....
    ?>
    ---------------------------------------------------------------
    jnorthau@yourpa ntsyahoo.com.au : Remove your pants to reply
    ---------------------------------------------------------------

    Comment

    • Jerry Stuckle

      #3
      Re: Long time to finish a program

      rahulthathoo wrote:
      Hi
      >
      I have a perl program called by my php script, which in turn is called
      by the browser. Now, the perl program is called using exec, but takes
      a long time to finish. So, till the time the perl script does not
      finish its job, the browser does not show anything. I have messages
      like "Dont close this window", but that does not show up till the
      whole perl program finishes. Is there a way, I can somehow remedy
      this, try to show a message on the browser - "Please while your data
      processes" and then do the processing in the background?
      >
      Rahul
      >
      Rahul,

      You need to flush() your output. But beware - just because it goes to
      the browser doesn't mean the browser will display it. For instance, if
      it's in a table, the browser may wait for the entire table to be sent.
      And there are a lot of other possibilities.

      But if you keep it short and clean, you have a better chance to get your
      message displayed immediately.


      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      Working...