ajax - PHP: Run function in background (and track it?) -


I have several parts of this problem. First of all, I have found a website and I can import data from another system I am trying, but the import may take a few minutes. Meanwhile I want to let the user go and continue to work on the website, I want to run the import in the background.

I am doing my Dev on a local WAMP server, but test and production environments are Linux.

I have given many answers here, some people suggest using the pcntl_fork () , others recommend running a command-line PHP script and others Ajax suggests.

My problems with each of these problems:

  • pcntl_fork () uses another example of Apache, Which is not what I am

  • Ajax closes the website until the import is complete.

  • I'm trying to run a function instead of the entire script, so I do not believe the command line will work.

Does anyone have any idea how to run this specially in the background? Apart from this, in any way to check and see if the process has been completed?


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -