Alex Rivera | Logout

most simple way to start a new process/thread in PHP

Asked 2011-12-17T22:36:55.560
13

Scenario:

  1. Shared hosting, so no ability to install new extensions + no CRON
  2. A submitted request needs to perform some heavy processes.
  3. I want the answer to the client to go as fast as possible, and the heavy lifting to continue immediately, but not stop the client.
  4. can be on a new thread (if it is possible) also no problem with starting a new process.

What is the best way to do this?

Edit
Report

1 Answer

-1
$WshShell = new COM('WScript.Shell');
$oExec    = $WshShell->Run('C:\xampp\php\php.exe C:\xampp\htdocs\test.php -a asdf', 0, true);

Cannot pass argv to test.php.

var_dump($argv);
answered 2012-07-25T21:01:52.873

Your Answer