Re: [PHP] Return to browser and keep running!

2003-10-16 Thread Marek Kilimajer
Now I noticed you are on windows. There is a user note in the manual that says that this function does not work as expected on windows: [snip] (by priebe at mi-corporation dot com) Note that register_shutdown_function() does not work under Apache on Windows platforms. Your shutdown function

Re: [PHP] Return to browser and keep running!

2003-10-16 Thread Manuel Vázquez Acosta
Outch! I have read the long discussion of this bug. But I tested the register_shutdown_function on a RH system with Apache 1.3.24 and it didn't work either (the connection keeps alive). The apache_register_shutdown_function doesn't exists in either system. Manu. -- PHP General Mailing List

Re: [PHP] Return to browser and keep running!

2003-10-15 Thread Marek Kilimajer
Use register_shutdown_function() Manuel Vázquez Acosta wrote: Hi all: I need to know if there is a way to send the output buffer to the browser, disconnect from it but keep running a task the user doesn't need to realize that is happening and that may take a few minutes to be complete.

Re: [PHP] Return to browser and keep running!

2003-10-15 Thread Mohamed Lrhazi
Read : PHP's process control functions may do what you need http://us3.php.net/manual/en/ref.pcntl.php Other alternative is to fork an external command with the exec or similar function, which would run another php script, in another php instance, in the background... make sure you

Re: [PHP] Return to browser and keep running!

2003-10-15 Thread Manuel Vázquez Acosta
Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Use register_shutdown_function() I made this test: ?php function shutingdown() { $fh = fopen('d:/tmp/test.out', 'w'); if ($fh) { for($i=0; $i1000; $i++) fwrite($fh, $i\n);

Re: [PHP] Return to browser and keep running!

2003-10-15 Thread Curt Zirzow
* Thus wrote Manuel Vázquez Acosta ([EMAIL PROTECTED]): Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Use register_shutdown_function() register_shutdown_function('shutingdown'); echo Running...; flush(); exit(); ? But the browser gets this:

Re: [PHP] Return to browser and keep running!

2003-10-15 Thread Manuel Vázquez Acosta
Add before the exit: set_time_limit(0); http://php.net/set_time_limit Curt You didn't get the idea. I want to be able to keep running a script disconnected from the browser; once all the output has been sent to the browser there's no need for the user to wait until the script finish its

RE: [PHP] Return to browser and keep running!

2003-10-15 Thread Chris W. Parker
Manuel Vázquez Acosta mailto:[EMAIL PROTECTED] on Wednesday, October 15, 2003 5:46 PM said: set_time_limit(0); makes the scripts to run completely without the 30 seconds error; but it will keep the connection with the browser; so it does not solve the problem though I think you want to