On Tue, 16 Jul 2002 20:13:52 +0200 "Pascal Miquet"
Hello,
I'd like to use some php scripts to launch some tasks in background, BUT apache will wait until all tasks are finished. This lead into time out, because all tasks take some times .... Could it be possible to setup apache so that runing such things will give hand as far as the command is executed.
I'm having a bit of trouble with your English, but I don't think you want apache to wait. It ties up the server. It is better to setup your script correctly. I don't do php, I use perl, and the solution for your situation is usually like this. The user hits the page and starts the long process, you set a cookie, or give them a password, to use when they return for the results. Set up the script to write the results of the long process to a file, and display the results when the user returns. Another thing you could do, which would tie up the server, is used NPH (non-parsed-headers) sometimes known as server-push. In this method, you start the long process, and keep the browser locked-in by pushing a counter at him, which is updated every second. This keeps the apache connection alive, until you get the results from your long process. Of course php can probably do all of this. I would consult a php mail list or newsgroup. -- use Perl; #powerful programmable prestidigitation