billionareHuman Posted March 6, 2009 Share Posted March 6, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/148232-how-to-call-2-scripts-from-the-same-server-without-the-2nd-waiting-for-the-first/ Share on other sites More sharing options...
JonnoTheDev Posted March 6, 2009 Share Posted March 6, 2009 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 &"); Quote Link to comment https://forums.phpfreaks.com/topic/148232-how-to-call-2-scripts-from-the-same-server-without-the-2nd-waiting-for-the-first/#findComment-778319 Share on other sites More sharing options...
billionareHuman Posted March 7, 2009 Author Share Posted March 7, 2009 thanks for that I'm calling them through a browser interface though as it's needed Quote Link to comment https://forums.phpfreaks.com/topic/148232-how-to-call-2-scripts-from-the-same-server-without-the-2nd-waiting-for-the-first/#findComment-778780 Share on other sites More sharing options...
alphanumetrix Posted March 7, 2009 Share Posted March 7, 2009 what do the scripts do? if you're trying to execute something, you might be able to set them up in an array, and execute it all at once. Quote Link to comment https://forums.phpfreaks.com/topic/148232-how-to-call-2-scripts-from-the-same-server-without-the-2nd-waiting-for-the-first/#findComment-778839 Share on other sites More sharing options...
billionareHuman Posted March 8, 2009 Author Share Posted March 8, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/148232-how-to-call-2-scripts-from-the-same-server-without-the-2nd-waiting-for-the-first/#findComment-779248 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.