Jump to content

Recommended Posts

I have a windows/apache setup. I want to call 2 scripts without the 2nd one waiting for the first one to finish executing to run.

 

I have tried setting up 2 different virtual hosts to call the 2nd script on a different host but the apache is not fooled and still waits.

 

I suspect it's an IP thing? perhaps if I had multiple IPs on my server it would work?

 

Thanks

Set the scripts running as background processes then you do not need to wait

 

exec("php /path/to/script1.php > /dev/null &");
exec("php /path/to/script2.php > /dev/null &");

the problem is the 1st script pauses and waits for input from the 2nd script (writes to a file). The first script then keeps checking for the the file input

 

Unfortunately php is not like a desktop application where I  can pause the application to wait for a user to input

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.