elana Posted October 24, 2007 Share Posted October 24, 2007 My web server runs on apache/Linux. It collects data from users (using a form), process it, does some calculations using external scripts and programs. The output is displayed using links given from an HTML which is created during the php's run. The Output HTML is created at the very beginning, and includes a "refresh" tag. During the processing and calculation, messages are written to that HTML, so the user is updated with the server's progress. Now, what I wish to do is : as soon as the HTML is created, redirect the user to this page, and contine with the php script . BUT - this doesn't work. What happens is that only when the calculation is finished - the page is redirected. until than the user just remains on the openning form, getting the annoying "I'm thinking" icon. I realized header("Location...") has to be followed by exit(), but it my case - I can't exit! I want to contniue calculation! I thought about forking - the child process will do header("Location...") and exit, while the parent process will continue calculation. But than I get the Fatal error: Call to undefined function pcntl_fork() , which I understand has to do with the fact that the php is in apache. Any ideas? I read that I should try to recompile php with --enable-pcntl , but I don't know if this is good when working with apache. Will it effect anything else? I'm working on a Linux server that does lots of other php tasks (such as wiki) apart from my server. Thanks ! ! Quote Link to comment https://forums.phpfreaks.com/topic/74574-continue-calculation-after-headerlocation/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.