launch an independant process

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

    launch an independant process

    Hello list,

    I would like to launch a process (a long one: ftp, a lot of data to
    check, a lot of time to do) from a page but do not want the end of the
    process to return to the page.

    I notice the pcntl_fork function, but need to rebuild PHP and Apache...

    Does anyone knows another way to do this ?

    Thanks a lot in advance for your help.
    Philippe
  • Colin McKinnon

    #2
    Re: launch an independant process

    pch wrote:
    [color=blue]
    > Hello list,
    >
    > I would like to launch a process (a long one: ftp, a lot of data to
    > check, a lot of time to do) from a page but do not want the end of the
    > process to return to the page.
    >
    > I notice the pcntl_fork function, but need to rebuild PHP and Apache...
    >
    > Does anyone knows another way to do this ?[/color]

    $cmd="/long/running/script";
    `echo $cmd | at now`;

    C.

    Comment

    • ziizii

      #3
      Re: launch an independant process

      What about this? Just suggestion.

      /* client is redirected and script continues with execution */
      ignore_user_abo rt(true);
      header("Locatio n: /back.php");

      Comment

      • pch

        #4
        Re: launch an independant process

        Colin McKinnon a écrit :[color=blue]
        > pch wrote:
        >
        >[color=green]
        >>Hello list,
        >>
        >>I would like to launch a process (a long one: ftp, a lot of data to
        >>check, a lot of time to do) from a page but do not want the end of the
        >>process to return to the page.
        >>
        >>I notice the pcntl_fork function, but need to rebuild PHP and Apache...
        >>
        >>Does anyone knows another way to do this ?[/color]
        >
        >
        > $cmd="/long/running/script";
        > `echo $cmd | at now`;
        >
        > C.[/color]
        Does this work in PHP ? If yes, it has no effect for me...

        --
        Please replace lalaposte by laposte ton send me an email.

        Comment

        • pch

          #5
          Re: launch an independant process

          ziizii a écrit :[color=blue]
          > What about this? Just suggestion.
          >
          > /* client is redirected and script continues with execution */
          > ignore_user_abo rt(true);
          > header("Locatio n: /back.php");
          >[/color]
          as far as I could see, the script is interrupted... to go to the
          location stuff.

          --
          Please replace lalaposte by laposte ton send me an email.

          Comment

          • Colin McKinnon

            #6
            Re: launch an independant process

            pch wrote:
            [color=blue]
            > Colin McKinnon a écrit :[color=green]
            >> pch wrote:
            >>
            >>[color=darkred]
            >>>Hello list,
            >>>
            >>>I would like to launch a process (a long one: ftp, a lot of data to
            >>>check, a lot of time to do) from a page but do not want the end of the
            >>>process to return to the page.
            >>>
            >>>I notice the pcntl_fork function, but need to rebuild PHP and Apache...
            >>>
            >>>Does anyone knows another way to do this ?[/color]
            >>
            >>
            >> $cmd="/long/running/script";
            >> `echo $cmd | at now`;
            >>
            >> C.[/color]
            > Does this work in PHP ? If yes, it has no effect for me...
            >[/color]

            No, it works OUTSIDE of PHP - that's rather the point.

            C.

            Comment

            Working...