Bruce wrote:
hey...
looking at initiating a perl app from inside a php web app. basically, the user will hit a button/start the app...the perl script will take awhile to complete, so i'd like to run the app and then continue on with the php process...
so my question boils down to what's the best approach.
1) i could run the perl app, and wait until it finishes, and then continue with the logic. the app will use the results of the perl script and stuff it into a db/tbl, so i need to get the results of the perl app.
2) i could run the perl script, and have it somehow run in the background.... this would ba good, if there's a way to essentially run the php script in the background such that it doesn't hang apache. i'd like to kick off the php, and have the php/web app return. i could set some form of session var to trigger off of when the php is complete..
any thoughts/pointers/etc...
thanks
-bruce
What you are trying to do (from my understanding) is called forking. Forking is a primitive means of threading your PHP application. There is a great tutorial called "Fork PHP!" at the forums where I am a moderator, (you should check them out sometime :D): http://www.phpfreaks.com/tutorials/71/0.php
Let us know if this is of any help to you.
~ Kevin "Arenium" M.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php