Re: [PHP] Forking in PHP

2002-01-02 Thread charlesk

register_shutdown_function() doesnt work either.  Seems to be IIS caching the output 
until the script finishes.  Anyone else have an idea?

-- Original Message --
From: "Bas van Rooijen" <[EMAIL PROTECTED]>
Reply-To: "Bas van Rooijen" <[EMAIL PROTECTED]>
Date: Wed, 02 Jan 2002 22:32:53 +0100


Hi,


You could use register_shutdown_function() which should be called before the script 
ends (duh!).

Define a function for your process and pass it's name to register_shutdown_function() .

bvr.

On Wed,  2 Jan 2002 15:14:59 -0600, charlesk  wrote:

>This works almost.  Instead of having echo "hello"; you have a huge process that 
>takes a while, the browser wont redirect until the script is finished.  This seems to 
>be a "feature" of IIS.  Has anyone found a way to do something similar in PHP 4.1.0, 
IIS 5.0, Windows 2000 Server?
>
>I basically want a way for the user to see a different page than have them waiting 
>for the script to finish.
>
>if ($process)
>{
>   echo "cool";
>} else
>{
>   header("Location: test2.php4?process=true");
>   error_log("this means it works\r\n",3,"c:\errors\errors.txt");
>   echo "hello";
>}
>?>
>
>Charles Killmer
>NetgainTechnology.com
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Forking in PHP

2002-01-02 Thread Bas van Rooijen

>Thanks for the reply but leave the "duh's!" out of comments please.

I'll think about it ;)

bvr.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Forking in PHP

2002-01-02 Thread charlesk

Thanks for the reply but leave the "duh's!" out of comments please.


-- Original Message --
From: "Bas van Rooijen" <[EMAIL PROTECTED]>
Reply-To: "Bas van Rooijen" <[EMAIL PROTECTED]>
Date: Wed, 02 Jan 2002 22:32:53 +0100


Hi,


You could use register_shutdown_function() which should be called before the script 
ends (duh!).

Define a function for your process and pass it's name to register_shutdown_function() .

bvr.

On Wed,  2 Jan 2002 15:14:59 -0600, charlesk  wrote:

>This works almost.  Instead of having echo "hello"; you have a huge process that 
>takes a while, the browser wont redirect until the script is finished.  This seems to 
>be a "feature" of IIS.  Has anyone found a way to do something similar in PHP 4.1.0, 
IIS 5.0, Windows 2000 Server?
>
>I basically want a way for the user to see a different page than have them waiting 
>for the script to finish.
>
>if ($process)
>{
>   echo "cool";
>} else
>{
>   header("Location: test2.php4?process=true");
>   error_log("this means it works\r\n",3,"c:\errors\errors.txt");
>   echo "hello";
>}
>?>
>
>Charles Killmer
>NetgainTechnology.com
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Forking in PHP

2002-01-02 Thread Bas van Rooijen


Hi,


You could use register_shutdown_function() which should be called before the script 
ends (duh!).

Define a function for your process and pass it's name to register_shutdown_function() .

bvr.

On Wed,  2 Jan 2002 15:14:59 -0600, charlesk  wrote:

>This works almost.  Instead of having echo "hello"; you have a huge process that 
>takes a while, the browser wont redirect until the script is finished.  This seems to 
>be a "feature" of IIS.  Has anyone found a way to do something similar in PHP 4.1.0, 
IIS 5.0, Windows 2000 Server?
>
>I basically want a way for the user to see a different page than have them waiting 
>for the script to finish.
>
>if ($process)
>{
>   echo "cool";
>} else
>{
>   header("Location: test2.php4?process=true");
>   error_log("this means it works\r\n",3,"c:\errors\errors.txt");
>   echo "hello";
>}
>?>
>
>Charles Killmer
>NetgainTechnology.com
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Forking in PHP

2002-01-02 Thread charlesk

This works almost.  Instead of having echo "hello"; you have a huge process that takes 
a while, the browser wont redirect until the script is finished.  This seems to be a 
"feature" of IIS.  Has anyone found a way to do something similar in PHP 4.1.0, IIS 
5.0, Windows 2000 Server?

I basically want a way for the user to see a different page than have them waiting for 
the script to finish.



Charles Killmer
NetgainTechnology.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Forking in PHP

2001-09-13 Thread Rasmus Lerdorf

See the pcntl extension in CVS

On Thu, 13 Sep 2001, Jonathan Chum wrote:

> I'm developing an app in PHP whereby I need to run simulataneous routines at
> once, but have some sort of control on how many instances of the childs will
> be spawned and died before another batch is started.
>
> Basically, I'm thinking of using a for loop that loops. Let's say I have 20
> loops that I need todo, but loop through and executing a system() 5 loops
> then wait for 15s which should give it enough time for the script in the
> system() to finish up and die. Then loop the next batch of 5 and so on.
>
> I'm wondering whether this would work or not. Also, I'm wondering whether
> there is a way todo this, similar to the forking in PERL. Any help would be
> great!
>
> Regards,
> Jonathan Chum
>
> 
> A I S   M e d i a ,  I n c .
> "We Build eBusinesses"
> 3541 Habersham at Northlake, Building E
> Tucker, GA 30084
> Tel: 678.382.2247 / Fax: 678.382.2471
> http://www.aismedia.com / [EMAIL PROTECTED]
> 
>
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Forking in PHP

2001-09-13 Thread Jonathan Chum

I'm developing an app in PHP whereby I need to run simulataneous routines at
once, but have some sort of control on how many instances of the childs will
be spawned and died before another batch is started.

Basically, I'm thinking of using a for loop that loops. Let's say I have 20
loops that I need todo, but loop through and executing a system() 5 loops
then wait for 15s which should give it enough time for the script in the
system() to finish up and die. Then loop the next batch of 5 and so on.

I'm wondering whether this would work or not. Also, I'm wondering whether
there is a way todo this, similar to the forking in PERL. Any help would be
great!

Regards,
Jonathan Chum


A I S   M e d i a ,  I n c .
"We Build eBusinesses"
3541 Habersham at Northlake, Building E
Tucker, GA 30084
Tel: 678.382.2247 / Fax: 678.382.2471
http://www.aismedia.com / [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]